Probably fixed episode guide with redir to official HMH guide
This commit is contained in:
parent
4be6e89298
commit
e06666a570
|
@ -24,10 +24,10 @@
|
|||
{{ range .Topics }}
|
||||
{{ if .Url }}
|
||||
<li class="ttc">
|
||||
<a href="{{ .Url }}">{{ .LinkText }}</a>
|
||||
<a href="{{ .Url }}">{{ .Username }}</a>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li class="ttc"><strong>{{ .LinkText }}</strong></li>
|
||||
<li class="ttc"><strong>{{ .Username }}</strong></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
|
|
@ -55,6 +55,11 @@ func EpisodeList(c *RequestContext) ResponseData {
|
|||
return c.Redirect(c.UrlContext.BuildHomepage(), http.StatusSeeOther)
|
||||
}
|
||||
|
||||
if slug == "hero" {
|
||||
// NOTE(asaf): Manual override for HMH
|
||||
return c.Redirect(fmt.Sprintf("https://guide.handmadehero.org/%s", topic), http.StatusSeeOther)
|
||||
}
|
||||
|
||||
if topic == "" {
|
||||
return c.Redirect(c.UrlContext.BuildEpisodeList(defaultTopic), http.StatusSeeOther)
|
||||
}
|
||||
|
@ -116,6 +121,11 @@ func Episode(c *RequestContext) ResponseData {
|
|||
return c.Redirect(c.UrlContext.BuildHomepage(), http.StatusSeeOther)
|
||||
}
|
||||
|
||||
if slug == "hero" {
|
||||
// NOTE(asaf): Manual override for HMH
|
||||
return c.Redirect(fmt.Sprintf("https://guide.handmadehero.org/%s/%s", topic, episode), http.StatusSeeOther)
|
||||
}
|
||||
|
||||
_, foundTopic := topicsForProject(slug, topic)
|
||||
if foundTopic == "" {
|
||||
return FourOhFour(c)
|
||||
|
|
Loading…
Reference in New Issue