You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My solution was to add this additional code to the where clause for finding candidates to go into the navbar ... && !x.ContainsKey(Keys.RedirectTo) where x has type IDocument
Be happy to submit a PR to CleanBlog, but
was not sure this is the best way and
thought you might want to handle it in Statiq.Web or Statiq.Framework by e.g. adding an IsRedirect property or method somewhere
The text was updated successfully, but these errors were encountered:
Your fix is good and I'm glad you were able to resolve it for your own use case, but yeah, I'd like to solve this holistically in Statiq Web. The problem is that there's a Redirects pipeline that's responsible for creating these redirect documents. Because the theme uses OutputPages which includes documents from all pipelines, the redirect documents get included.
Just thinking out loud here, but I'm thinking I'll resolve this in one of the following ways:
Metadata for documents that excludes them from the OutputPages collection.
Some sort of way to designate an entire pipeline as being excluded from OutputPages.
Then the Redirects pipeline in Statiq Web can use whatever upstream mechanism I implement to exclude these redirect files.
I'm going to chew on this for a day or two while I figure out the "right" way of handling this. Thanks!
Just upgraded Static.Web to 1.0.0-beta.33 and used latest CleanBlog
A minor thing, but if using redirects via frontmatter then they are included in the HTML generated by _navbar.cshtml
Not visible (no text in link), but they are in the generated HTML.
I made an example
https://github.com/henrikrxn/StatiqWebQuickStartWithCleanBlogTheme
It uses Devlead's NuGet package for including themes via Uri, so it was easy for me to switch between CleanBlg versions
This branch in the same repo uses my own fork of CleanBlog to filter out redirects
https://github.com/henrikrxn/StatiqWebQuickStartWithCleanBlogTheme/tree/Using-CleanBlog-fork-excluding-Documents-with-RedirectTo
My solution was to add this additional code to the where clause for finding candidates to go into the navbar
... && !x.ContainsKey(Keys.RedirectTo)
where x has typeIDocument
Be happy to submit a PR to CleanBlog, but
The text was updated successfully, but these errors were encountered: