Skip to content

Generated site contains a lot of invalid pages #789

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

Open
Kanabenki opened this issue Nov 1, 2023 · 2 comments
Open

Generated site contains a lot of invalid pages #789

Kanabenki opened this issue Nov 1, 2023 · 2 comments
Labels
A-Build-System C-Bug A problem with the code that runs the site

Comments

@Kanabenki
Copy link
Contributor

Kanabenki commented Nov 1, 2023

While testing some accessibility linting tools for #396, I noticed that sitemap.xml contains lots of url pointing to the default zola html for non-rendered section/page (see here for example).

It seems this is due to how the generate_* tooling generates the content, as we end up with lots of markdown files that actually do not correspond to a section/page in content (they are used to build lists like here instead).

A possible solution that I tested would be to add render = false to the generated sections front matter, and manually exclude the generated pages from the sitemap. There is no equivalent to render = false for pages, so this need to be done with an extra attribute and a custom sitemap template, but this does not completely solves the problem as the invalid html is still built. The simplest way to fix that would probably to have the render attribute be implemented by Zola for pages, otherwise we would need to change how list pages are generated to avoid going through some intermediate markdown.

@rparrett
Copy link
Contributor

rparrett commented Nov 1, 2023

A while back the author of Zola suggested not using "pages" at all for this sort of content in #601.

@Kanabenki
Copy link
Contributor Author

Thanks for pointing that out, indeed it seems that would properly solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Build-System C-Bug A problem with the code that runs the site
Projects
None yet
Development

No branches or pull requests

2 participants