Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Pretzel does not handle :slug setting for permalinks #316

Closed
stanac opened this issue Jan 6, 2017 · 4 comments
Closed

Pretzel does not handle :slug setting for permalinks #316

stanac opened this issue Jan 6, 2017 · 4 comments

Comments

@stanac
Copy link

stanac commented Jan 6, 2017

Problem is that Pretzel doesn't handle :slug setting for permalinks.

Steps to reproduce:

  1. Create new site with pretzel create (I am using razor)
  2. Set slug in permalink in _config.yml so config file looks like this:
pretzel: 
    engine: razor
permalink: /blog/:year-:month-:day/:slug
  1. run bake command

Problem is that pretzel is trying to create a directory that looks like this for file that looks like this:
c:\mysite\_site\blog\2017-01-05\:slug\index.html and it fails with System.NotSupportedException: The given path's format is not supported.. Issue is in class JekyllEngineBase method CreateOutputDirectory

This is from Jekyll docs: https://jekyllrb.com/docs/permalinks/

Slugified title from the document’s filename (any character except numbers and letters is replaced as hyphen). May be overridden via the document’s slug YAML front matter.

After further investigation i thought that maybe permalink should be indented so it falls under pretzel node in config file, but it lead to permalink setting being ignored.

Basically it should be easy to fix, I could submit a pull request if you agree.

@laedit
Copy link
Member

laedit commented Jan 6, 2017

Thanks a lot for your interest in Pretzel ! 😄
Indeed it seems that the property slug is missing in Pretzel, a PR is welcome.

@laedit
Copy link
Member

laedit commented Jan 7, 2017

Fixed by #317

@laedit laedit closed this as completed Jan 7, 2017
@stanac
Copy link
Author

stanac commented Jan 7, 2017

yes, it looks like someone was faster to fix it :)

@thoemmi
Copy link
Contributor

thoemmi commented Jan 8, 2017

@stanac Sorry, couldn't resist 😉

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

No branches or pull requests

3 participants