@@ 41,10 41,10 @@ func GetRootSection(section *domain.Section) *domain.Section {
}
// GetSubsection takes a name, and a section, and tries to get a subsection with the given name.
-// The section name corresponds to the section's permalink, trimmed to its base name (e.g. /test/abc-def's section name is abc-def).
+// The section name corresponds to the section's slug (e.g. /test/abc-def's section name is abc-def).
func GetSubsection(name string, section *domain.Section) *domain.Section {
for _, sub := range section.Subsections {
- if subName := path.Base(sub.Permalink); subName == name {
+ if sub.Slug == name {
return sub
}
}