-
Notifications
You must be signed in to change notification settings - Fork 27
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
Using the menu url in a permalink? #17
Comments
Well... I don't know that my intention is to ever necessarily be cool 😉. That said, it depends on what you are trying to do, and why. In your menu you can indeed set a slug that we will use in the menus that we will use when we build a permalink... but if you are trying to access our data in a Jekyll permalink (as your example shows) that is something you will need to consult with Jekyll on because they don't allow the consumption of external data past a static list AFAIW. |
Thanks for the quick response! Does that basically mean I should create another variable, like category, to match the menu for the permalink? Maybe I'm expecting too much from this gem, and really should treat it like a way to create menus and nothing more?
|
You can create a hook to achieve your goal (https://jekyllrb.com/docs/plugins/hooks -- you probably want to insert yourself into We act as an aggregator, with this kind of change we would act as an aggregator, and broker of data back into the source we aggregate... things get particularly complicated when you calculate in that page could be in any number of menu's, so we have to think about what to do in those situations, do we throw the build, or do we ignore the data, or any number of things. |
Ok i think I'm starting to understand. I don't know much Ruby so this has not been coming easy to me. Setting up hooks would probably be more effort than its worth for me. I just want to group content together (collections of pages ... not blog posts). So it seems like the default :categories is the way to get the url to sync up with the menu. It just seemed redundant
Happy Thanksgiving! |
You actually don't need to do anything special in Jekyll, or Jekyll Menu's to do that. Organize your files as so (and then create a collection https://jekyllrb.com/docs/collections), then in each collection page create a menu for your collection, and we'll infer the permalink for the collection on your behalf when you write the menu out. Happy Thanksgiving to you, as well! |
In my posts / pages, is it possible to access the url property of a menu to create dynamic permalinks instead of hardcoding them in?
Doesn't work. Hard-coding the permalink does but that's not very cool...
The text was updated successfully, but these errors were encountered: