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
Support custom root URL path as config parameter #26
Comments
You can set the destination or source where files are generated: http://wiki.github.com/mojombo/jekyll/configuration Also, with the new Permalink system you can pretty much tell your posts to live where you want: http://wiki.github.com/mojombo/jekyll/permalinks Keep explaining if I'm missing your point here :) |
For example, with the site exported as This is doubly problematic:
Though it is possible to work around this, above all, it makes it substantially less than obvious to new users exactly how they should set up Jekyll in situations like this. These situations are extremely common, for example, in university or departmental web hosting, and I expect this could be a key demographic for Jekyll use. There are two obvious solutions that spring to mind:
WordPress and its ilk all generally have a core configuration variable specifying where they are exported in the external URL structure, entirely independent of where they live on the filesystem (and never assuming that they are exported at |
I'm working on a patch to add a |
I made a patch that can be used for this (and more): http://github.com/mojombo/jekyll/issues#issue/15 |
Yeah, I saw that, but thanks for the heads-up. It's a very good (and general/powerful) idea. I hope to use it in general. It does not, however, solve the problem of simplifying the templates by making URL generation smarter for posts, or allowing local preview in WEBrick before posting to the live site. I definitely want to see your post hit the mainline, but I've pulled together a more complete solution to the url_root problem which I'll share shortly. |
That's cool. If you generate relative paths it will be possible to browse the generated site files directly even without WEBrick. That would be nice. |
This basic idea is handled nicely by the custom |
I do believe this should be closed, as the method mentioned above solves the problem quite well. It's worthwhile noting that you may wish to ignore any further changes to your _config.yml with |
Closing this. I'll think about a way to do arbitrary overriding of config settings from the command line. |
Jekyll appears fairly hard-wired to assume that the generated site will live at the root of the web host (post.url, the WEBrick preview server, etc. assume everything begins directly at "/"). It would be useful in many situations to have a Jekyll-generated site living in a specific subdirectory, without requiring lots of template wrangling, and while still supporting the WEBrick preview server. Ideally this would be a single config variable which would:
The text was updated successfully, but these errors were encountered: