mirror of
https://github.com/avelino/awesome-go.git
synced 2024-11-07 16:33:40 +00:00
do not change the link in the content menu
Signed-off-by: Avelino <avelinorun@gmail.com>
This commit is contained in:
parent
9739a7b58f
commit
35ef3dda5f
@ -104,8 +104,9 @@ func changeLinksInIndex(html string, query *goquery.Document) {
|
|||||||
href, exists := s.Attr("href")
|
href, exists := s.Attr("href")
|
||||||
if exists {
|
if exists {
|
||||||
uri := strings.SplitAfter(href, "#")
|
uri := strings.SplitAfter(href, "#")
|
||||||
if len(uri) >= 2 {
|
if len(uri) >= 2 && uri[1] != "contents" {
|
||||||
html = strings.ReplaceAll(html, fmt.Sprintf(`href="%s"`, href), fmt.Sprintf(`href="%s"`, uri[1]))
|
html = strings.ReplaceAll(
|
||||||
|
html, fmt.Sprintf(`href="%s"`, href), fmt.Sprintf(`href="%s"`, uri[1]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
15
tmpl/cat-tmpl.html
vendored
15
tmpl/cat-tmpl.html
vendored
@ -55,7 +55,18 @@
|
|||||||
<script async src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=ce1dd292-c6f0-4062-ac99-55bc005bbbf9"></script>
|
<script async src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=ce1dd292-c6f0-4062-ac99-55bc005bbbf9"></script>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<a href="https://www.doppler.com/?utm_campaign=github_repo&utm_medium=referral&utm_content=awesomego&utm_source=github"><img src="https://github.com/avelino/awesome-go/raw/main/tmpl/assets/sponsors/doppler.png" alt="Doppler"></a>
|
<a href="https://www.doppler.com/?utm_campaign=github_repo&utm_medium=referral&utm_content=awesomego&utm_source=github">
|
||||||
|
<img src="https://github.com/avelino/awesome-go/raw/main/tmpl/assets/sponsors/doppler.png" alt="Doppler">
|
||||||
|
<br />
|
||||||
|
<b>Quit struggling with scattered API keys and access controls.</b>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<a href="https://bit.ly/awesome-go-xteam">
|
||||||
|
<img src="https://avelino.run/sponsors/xteam-logo.png" width="200" alt="x-team">
|
||||||
|
<br />
|
||||||
|
<b>Work from anywhere in the world with top tech companies like Riot Games, Coinbase, and Google.</b>
|
||||||
|
</a>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<a href="https://m.do.co/c/bd3b723c0a36?utm_medium=opensource&utm_source=awesome-go"><img src="https://avelino.run/sponsors/do_logo_horizontal_blue-210.png" alt="Digital Ocean"></a>
|
<a href="https://m.do.co/c/bd3b723c0a36?utm_medium=opensource&utm_source=awesome-go"><img src="https://avelino.run/sponsors/do_logo_horizontal_blue-210.png" alt="Digital Ocean"></a>
|
||||||
@ -66,7 +77,7 @@
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{{range .Items}}
|
{{range .Items}}
|
||||||
<li><a href="{{.Url}}" alt="Go to {{.Title}} link" title="Go to {{.Title}} link">{{.Description}}</a></li>
|
<li><a href="{{.Url}}?utm_campaign=awesomego&utm_medium=referral&utm_source=awesomego" alt="Go to {{.Title}} link" title="Go to {{.Title}} link">{{.Description}}</a></li>
|
||||||
{{end}}
|
{{end}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user