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

Permalink support? #961

Closed
pranphy opened this issue May 16, 2022 · 1 comment
Closed

Permalink support? #961

pranphy opened this issue May 16, 2022 · 1 comment

Comments

@pranphy
Copy link

pranphy commented May 16, 2022

I am migrating from another static site generator and most of my .md files are named YYYY-mm-dd-page-slug.md. Something like

permalink: %year/%m/%slug

in global config would result the processed file to be generated like

YYYY
└── mm
    └── page-slug
        └── index.html   

Is something like this possible in Franklin? I am basically trying to avoid having to rename my files YYYY-mm-dd-page-slug.md to YYYY/mm/page-slug.md.

@tlienart
Copy link
Owner

Hello @pranphy, no this is not directly supported by Franklin. I think the easiest here would be for you to write a script that renames your files.

You can set a slug per page but not with a pattern. You could call a function that does it automatically but this is not well supported in the current version of Franklin and would likely lead to a headache more than a working solution. The next version allows you to do this but that's not helpful to you right now.

Hope the workaround is not too cumbersome for you!

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