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

publish_date_in_filename does not work in pages config context #778

Closed
koitsu opened this issue Jul 6, 2020 · 3 comments
Closed

publish_date_in_filename does not work in pages config context #778

koitsu opened this issue Jul 6, 2020 · 3 comments

Comments

@koitsu
Copy link

koitsu commented Jul 6, 2020

Version

0.15.11

Details

The Cobalt documentation says that publish_date_in_filename is supported both posts and pages config contexts: https://cobalt-org.github.io/docs/config/

However, the config parser disagrees -- it works in posts but not pages:

Error: serve command failed
Info: caused by Error reading config file "/home/jdc/cobalt/blog/_cobalt.yml"
Info: caused by pages: unknown field `publish_date_in_filename`, expected `default` at line 34 column 3

Lines 25 through 37 of _cobalt.yml:

posts:
  dir: "blog"
  drafts_dir: "_drafts"
  publish_date_in_filename: true
  default: {
    layout: "default.liquid"
  }

pages:
  publish_date_in_filename: false
  default: {
    layout: "default.liquid"
  }

Not sure if this is a documentation issue or an issue with #562.

@epage
Copy link
Member

epage commented Jul 8, 2020

Good call. I've updated the documentation to reflect what we had intended and fixed a little formatting that I found awkward.

Besides the discrepancy, is this something you'd like to see? If so, could you help me understand the use case?

@koitsu
Copy link
Author

koitsu commented Jul 8, 2020

Use case: trying out several static site generators to find which one I like / suits my needs. I'm following documentation (incl. example configurations) and seeing what the results are.

I have no actual use for publish_date_in_filename on a per-page level myself.

@epage
Copy link
Member

epage commented Jul 8, 2020

Use case: trying out several static site generators to find which one I like / suits my needs. I'm following documentation (incl. example configurations) and seeing what the results are.

Well, welcome to cobalt! Things are a it slow right now as I'm trying to wrap up another project before re-focusing back on cobalt. When I am back on cobalt, I'm in the middle of re-doing the internals so there won't be much visible progress but once done, it should make it a lot easier to add new features (which there are a lot I need for my own use cases).

I have no actual use for publish_date_in_filename on a per-page level myself.

Thats ok. Thanks for noticing the problem with the docs!

@epage epage closed this as completed Jul 8, 2020
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

2 participants