Skip to content
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

Applying Front Matter Defaults to plugin-generated pages #107

Closed
ohadschn opened this issue Sep 2, 2017 · 3 comments
Closed

Applying Front Matter Defaults to plugin-generated pages #107

ohadschn opened this issue Sep 2, 2017 · 3 comments

Comments

@ohadschn
Copy link

ohadschn commented Sep 2, 2017

I couldn't get Front Matter Defaults to be applied on the plugin-generated category/tag pages, even when no filters were specified in the relevant _config.yml section:

defaults:
  - scope:
      path: ""
    values:
      header:
        image: images/foo.jpg # this works for posts and pages, but not jekyll-archives pages
@piyushpaliwal
Copy link

This issue is open since a couple of years now. Is it possible to have some sort of configuration applied for adding the front matter defaults?

@ashmaroli
Copy link
Member

@piyushpaliwal Have you tried changing the type value in the defaults configuration?
For example, say I want my category archives to default to show_read_more: true. The my config file would have the following:

defaults:
  - scope:
      path: ""
      type: category  # For tag-based archive pages, this would have been 'tag'
    values:
      show_read_more: true

@piyushpaliwal
Copy link

Thanks a lot @ashmaroli, this indeed fixed my problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants