New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish the multilingual feature #2303

Closed
wants to merge 51 commits into
base: master
from
Commits
Jump to file or symbol
Failed to load files and symbols.
+4 −2
Diff settings

Always

Just for now

Viewing a subset of changes. View all

Create a copy of the section node for RSS

So the Permalink gets correct when listing translations.

I have also checked the other relevant places to make sure we do not overwrite node values we need later.

Pointers can be tricky, but lesson learned is: A copy is cheap.

Updates #2309
  • Loading branch information...
bep committed Aug 11, 2016
commit 3834927ab100c4552fa4180c7acaca9adb449123
Copy path View file
@@ -1855,9 +1855,11 @@ func (s *Site) renderSectionLists(prepare bool) error {
if !viper.GetBool("DisableRSS") && section != "" {
// XML Feed
rssuri := viper.GetString("RSSUri")
s.setURLs(n, section+"/"+rssuri)
c := *n
rssNode := &c
s.setURLs(rssNode, section+"/"+rssuri)
rssLayouts := []string{"section/" + section + ".rss.xml", "_default/rss.xml", "rss.xml", "_internal/_default/rss.xml"}
if err := s.renderAndWriteXML("section "+section+" rss", n.addLangPathPrefix(section+"/"+rssuri), n, s.appendThemeTemplates(rssLayouts)...); err != nil {
if err := s.renderAndWriteXML("section "+section+" rss", rssNode.addLangPathPrefix(section+"/"+rssuri), rssNode, s.appendThemeTemplates(rssLayouts)...); err != nil {
return err
}
}
ProTip! Use n and p to navigate between commits in a pull request.