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
There are use cases where the content of a site should be filtered on built to remove certain content a user should not see.
For example, a product documentation contains every feature in its Markdown files, but for a certain customer only a few of them are installed. The generated project should only contain documentation for the available features.
Implementationwise this will be implemented in a new shortcode that is flagged with a feature array in its parameter, similar to tags in frontmatter. If at least one of this feature flags is activated in the params of the config.yaml, the content will be put in the resulting page.
There also may be cases where a whole page is dedicated to a certain feature. If the feature is not available, in a best case scenario, the page isn't created. This probably can't be implemented with the current Hugo features, but we may could leverage the hidden feature of the theme to at least create an empty page that doesn't appear in any indices (search, tags, rss, etc).
There are use cases where the content of a site should be filtered on built to remove certain content a user should not see.
For example, a product documentation contains every feature in its Markdown files, but for a certain customer only a few of them are installed. The generated project should only contain documentation for the available features.
Implementationwise this will be implemented in a new shortcode that is flagged with a feature array in its parameter, similar to tags in frontmatter. If at least one of this feature flags is activated in the params of the
config.yaml
, the content will be put in the resulting page.There also may be cases where a whole page is dedicated to a certain feature. If the feature is not available, in a best case scenario, the page isn't created. This probably can't be implemented with the current Hugo features, but we may could leverage the hidden feature of the theme to at least create an empty page that doesn't appear in any indices (search, tags, rss, etc).
See:
https://discourse.gohugo.io/t/ignore-content-when-publishing/13008/4
https://discourse.gohugo.io/t/render-some-pages-only-in-non-production/44306/5
https://discourse.gohugo.io/t/cli-filter-content-for-different-target-audiences/15439
https://discourse.gohugo.io/t/omitting-content/26437
The text was updated successfully, but these errors were encountered: