Every repository with this icon (
Every repository with this icon (
| Description: | Jekyll is a blog-aware, static site generator in Ruby edit |
-
I'd like to make pages that shows all the posts with a specific category/topic/tag. One such page should be created for each category/topic/tag.
E.g. if I have category "foo" and category "bar" I want Jekyll to generate the files /category/foo.html and /category/bar.html, each with a list of posts of that category. I don't want to create them manually if I have lots of categories.
So what I'm thinking about is some kind of "build description" file that specifies what files should be built and how.
Here's how that file can look in pseudo-code:
for each category: generate "categories/#{category}.html" from "_category.html" for each topic: generate "topics/#{topic}.html" from "_topic.html"Do you understand what I'm trying to say? Has anyone else thought about something like this and think it would be a good idea?
This could also be used to do something completely different from Jekyll's default behaviour if we want to. E.g. Jekyll's default would be to generate posts from the files in the "_posts" directory and "normal" pages from all other files, but it would be possible to override that with something else if needed.
Comments
-
I think some generators for Jekyll would be really useful. Here's what I had in mind:
jekyll generate post [title] => _posts/todays-date-title.textile jekyll generate post [title] --markdown => _posts/todays-date-title.markdown jekyll generate site => creates _posts, _layouts dir, default layout, index.html, _config.ymlIt would be neat to have a generic generation system like Rails, but I think this would be a decent start to give those who use jekyll for the first time or those who need to whip up a new post.
Comments
Maybe fold in drnic's work?
h0rs3r4dish
Fri Oct 09 17:36:44 -0700 2009
| link
I thought this would be cool too. My patch probably isn't very efficient or anything, but it's a proof-of-concept that demonstrates generating somebody can build upon/the like: http://github.com/h0rs3r4dish/jekyll
-
13 comments Created 7 months ago by n8agrinAllow projects to have their own Liquid tagsholdxI find that I often need to implement my own Liquid tags for various projects I've worked on in Jekyll. I implemented this in my Jekyll branch by allowing each project to have its own _tags directory. Here's the patch; happy to refactor if you like the idea but not the implementation:
http://github.com/n8agrin/jekyll/commit/f65e50703ce2671f532e7bbdecfebf11aeccf9ad
Comments
I like it. This definitely needs some tests and features built in if you want it included.
I'll gladly write the tests. Can you elaborate on what you mean by "features built in" so I can move forward on getting this integrated?
Sorry about the dup msg...
No problem. I meant a Cucumber feature/integration test for this, just to ensure that it works as expected.
Another issue with this: some sort of
secure: falseflag should be necessary to enable this feature. Since Jekyll is in charge of generating the GitHub pages, we can't let just anyone to execute whatever they'd like on the server. For most users generating posts though, this behavior is extremely useful.That shouldn't be hard to implement. I'll add it in my fork.
I added support for a _liquid_tags directory along with a config param "liquid_tags" that defaults to false. Also added two tests to test_site. It may be worth breaking the "should load external tags" test into its own context since it uses its own site with a different config. Let me know what you think.
http://github.com/n8agrin/jekyll/commit/dfd5ef02b4c0edf59476aa15b472a0a5ab9980ee
I see this is on hold. Anything else I can do to help it get through?
There's been no work done towards an insecure/secure mode yet. I'd like to see that in the lib first. The same conditions apply as my earlier comment.
Ah ok, I didn't interpret your earlier request as you literally wanted a "secure: false" flag implemented. I took that to mean you wanted the option to turn importing custom tags on and off, hence the liquid_tags config param. My mistake, shouldn't be hard to get a secure flag working.
What's holding this back? It seems like it has a command line flag to turn it on or off. why isn't that enough?
While I realize people are working on this (sorry to be impatient!), I have come up with a temporary solution for those that are interested:
http://benjaminthomas.org/2009/10/21/custom-liquid-tags-in-jekyll.html
Cool. I just bumped this here: http://github.com/n8agrin/jekyll/commit/4b82e06f8b0ee153149edc803abd297d50539b41 Hopefully that's should cover everything.
Summary of changes:
1) Changed liquid_tags flag to "secure", secure is set to true by default
2) Added if block that checks the secure flag, if it's false, liquid tags (and presumably other insecure code) can be loaded.
3) Added tests for the liquid tags.I'm not terribly happy with the line that reads "load file unless require file", I may change that to just "load file".
Please review and let me know if there are issues which need to be resolved before this can be merged.
-
I'm in the process of creating the wiki page for migrating from other platforms, and I definitely think this could use some work. Something like the following would be good:
jekyll import wordpress --user=root --password=lol --db=whatever [--markdown|--textile]
Comments
Your CLI syntax looks great, much better than the methods outlined on the wiki. It's been 3 months since you've opened this for suggestion, I'd say your syntax is the way to go. Also, why are there no instructions on migrating from WordPress? Thanks, I'm excited about migrating to Jekyll!
@appden: Yeah, I definitely need to hack this up. The main issue is that you only have to do the import once, so it's never really been a painful issue when using jekyll over time. This is definitely an important feature to get to though.
@qrush: Awesome. I know its low priority, but it does seem to be a small barrier to entry. Same with the missing Wordpress instructions. When these barriers are lifted, Jekyll will likely gain many more users. Thanks for the quick reply!
unthinkingly
Tue Sep 22 19:01:01 -0700 2009
| link
looks good to me -- just getting started with a transition this second and would love to be done already so I could tell my friends how cool i am.
-
Jekyll currently support markdown and textile markup.
Is there any chance to have asciidoc markup available ? http://www.methods.co.nz/asciidoc/
Thank you very much.
Comments
We'll definitely accept a patch for this if you're willing to hack it up. That being said, I wonder if the templating system within Jekyll could be refactored in a way to make this kind of extension easier.
-
I'm not 100% sure what's going on, but I'm assuming it's a difference in how variables are assigned. I'm running Jekyll 0.5.0 locally and it groups my posts by year and month correctly. On my page it is repeating the information for each post. The relevant code is below. Let me know if any more information is needed.
<dl id="archives"> {% for post in site.posts %} {% if post.date|date:"%B" != previous_post.date|date:"%B" %} {% if post.date|date:"%Y" != previous_post.date|date:"%Y" %} {% assign year_changed = true %} {% else %} {% assign year_changed = false %} {% endif %} <dt class="month{% if year_changed %} year{% endif %}"> {{ post.date | date:"%B" }} {% if year_changed %} <span>{{ post.date | date:"%Y" }}</span> {% endif %} </dt> {% endif %} <dd><span>{{ post.date | date:"%d" }}</span> <a href="{{ post.url }}">{{ post.title }}</a></dd> {% assign previous_post = post %} {% endfor %} </dl>Comments
I just tried out this on my own blog and I didn't see any repeated info. I also don't see any on your site. Could you clarify this a bit or provide a smaller example?
tristandunn
Wed Apr 29 06:50:21 -0700 2009
| link
Under Archives in the sidebar it has April and 2009 above each posts when it should only be above them once since they are from the same month and year. I'll try create a smaller example tonight.
tristandunn
Wed Apr 29 18:59:09 -0700 2009
| link
I still can't recreate it on my local version, but here's a comparison of the difference I'm talking about.

Tristan,
Is this still happening? GitHub Pages is now on Jekyll 0.5.1.
tristandunn
Tue Jun 23 15:07:42 -0700 2009
| link
Yes, but still no clue why.
Output is at http://tristandunn.com/ and the logic is at http://github.com/tristandunn/tristandunn.github.com/commit/f8f115c281f98c8fc343bcf9290f4e71c312b28e#diff-0
Upgraded to 0.5.1 locally and it rendered correctly still.
-
I made an importer that reads the contents of an RSS feed and creates HTML files in _posts. It can be used as a generic importer from any blog engine.
http://github.com/vilcans/jekyll/tree/rss_importer
I have only tested it on my own RSS feed and on a Blogger feed, and it worked. It may not create proper post IDs or have other problems with other feeds.
Pull and modify if you want.
Comments
-
4 comments Created 6 months ago by henrikpost_defaults section in _config.yml, for default layoutsholdxSo you don't have to specify the layout in every post.
Implemented here (without tests, sorry): http://github.com/henrik/jekyll/commit/77bf31c42c25c2f87c215348a816b730104fe820
Comments
Love the idea but it has some of your custom mods built in. If this could be sliced off based on the current HEAD and tested, I'm up for it :)
I'd love to see this. I often write the same piece of YAML boilerplate at the beginning of my posts. I was thinking of writing something similar but have not yet had time.
Adding this feature would do a tremendous amount toward sharing README.markdown, index.markdown file between the gh-pages/jekyll-rendered site, and the github 'inlined readme' feature. Appending front matter makes src files look ugly for example when navigating through the regular github views. If we had default layouts in jekyll and can write just plain markdown it would remain compatible with github's own system (and many other systems).
I've taken Henrik's commit, updated it to work under the current (0.5.4) tag, and added a few tests. It's available for review on the
post_defaultsbranch of my fork: http://github.com/mikewest/jekyll/tree/post_defaults -
6 comments Created 6 months ago by jrkSupport custom root URL path as config parametersuggestionxJekyll 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:
- Prefix all system-generated URLs
- Be available as a Liquid tag for templating
- Be simulated in the WEBrick preview server
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 :)
source,destination, and the new permalink spec all define the structure relative to the local filesystem. They say nothing about where these files will live on the server relative to its URL (not filesystem) root.For example, with the site exported as
http://some.server/url/root/<jekyll-starts-here>, a user would have to hard-code/url/rootbefore CSS files and all other content in the generated_site(or, yes, whereverdestinationpoints) in every single template file.This is doubly problematic:
- Hard-coding the root URL path directly in all the template source is needlessly inflexible (though admittedly it can be altered with a simple find/replace)
- It breaks the WEBRick preview server (
--server), which is essential for easily previewing the site with links (especially to CSS) intact without having to push to the live server. One of the key reasons this exists, I believe, is to allow quick hosting where Jekyll files reside at the URL root of the server (vs. previewing on an existing site, like personal web sharing on today's desktop OSes, where it would generally have to live in a sub-path, breaking all the absolute links), and for exactly the same reasons, a site which is built (with absolute paths) to live in a sub-path of the URL root will fail during preview (no CSS, internal links break, etc.)
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:
- Using relative paths for everything. This could be significantly aided by the template system via a dynamic variable
page.relative_path_to_rootwhich would yield something of the form "../../../". This is more complex in the sense that this variable is dynamic per-page, and it does not work with simple existing template examples which link directly to pages and posts viaurltemplate variables—specifically, it requires many more changes to the template. - Configurable absolute path root. This would be a single static variable
site.url_rootor similar, specified in _config.yml, used in the templates to configurably define absolute paths to resources (e.g."{{site.url_root}}/css/screen.css"), and which would cause the WEBrick preview server to host files athttp://localhost:4000/url/root/instead ofhttp://localhost:4000/.
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
http://host/). I'd like to see essentially the same thing in Jekyll.I'm working on a patch to add a
url_rootconfig option (which defaults to/) which is exported in thesiteobject, prefixes post URLs in the templates, and which sets the preview WEBrick server to export the site athttp://localhost:<server_port>/<url_root>(with a redirect on/to/<url_root>ifurl_root != '/'). I'll wrap and post it after a string of meetings, but am curious if anyone has thoughts on a better way to handle this general usage model of non-server-root Jekyll site deployments, in case I'm completely crazy.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.
-
Comments
rebased against current mojombo/master instead of my own fork: http://github.com/jberkel/jekyll/commit/4cd469585a9f7662dcad2fd4b3e6387b56d4b317
Is there any example sites this could be tested against? None of the converters are tested, they definitely all need to be somehow. I'd like to reorganize how they're called as well, it seems too manual at the moment.
sorry, only tested against my site. i'm a big fan of testing, but just didn't see the point writing tests for this since it's a one-off thing (the conversion process). also don't mind having a manual process for importing, most of jekyll's users seem to be geeky enough to figure this out for themselves anyway :)
-
11 comments Created 6 months ago by Jens-nRefactor access to category/tag namesfeaturexAdding a sorted array with all available category names as 'site.categorynames'. This allows to set up a listing of all categories.
Please pull from my repository (commit b659e9c).
Comments
I like this, but it definitely needs tests. On hold until someone can get around to writing them.
Hi, I created a branch with tests: http://github.com/Jens-n/jekyll/tree/test_categorynames
Might I humbly suggest
category_listinstead ofcategorynames?Why not rework site.categories to accomplish this? So we can do like:
{% for category in site.categories %} <h2>{{ category.name }}</h2> {% for post in category.posts %} ...Initially I just needed a small fix for my site. A one-liner seemed like a good-enough solution for the time being. I initially even set out to implement Thomas idea but was too lazy, so I stuck with the one-liner.
That said, I think that a bit of re-modeling might benefit jekyll in the future (i.e. decoupling filesystem layout and reading from content transformation, changing Topic and Category into real objects, etc.).
I was able to make the snippet in my last comment work, but in order to keep
site.categories.fooworking, I had to make a Categories class that acts both like a hash (mapping category names to Post arrays) and like an array of Category objects (througheach).This seems like it would become more of a problem if categories ever get more data. I'd like to be able to someday do:
<a href="{{ category.url }}">{{ category.name }}</a>and have it link to an automatically generated _site/[category]/index.html. But if
site.categories.foois an array of posts, the extra category data won't be accessible from it.Maybe we could change
site.categories.footosite.categories.foo.posts?Alright, now that tags are in master I think it's time to address this issue. I like tomo's idea but I need to play around with this more. If you've got other suggestions pipe up!
If this was to be refactored, I think it would need to degrade gracefully. For instance I think at least until 0.6.0 or 0.7.0 the
siteobject would have to work as normal. There could then be a new object, perhapsjekyllor another name that makes sense with the refactored payload.Or maybe this could be done through a config value...
payload: newand default to old, print out plenty of warnings in the meantime.I really like tomos idea. I like to have a strong domain model at the heart of my programs and his idea goes along the same lines. My suggestion is: Follow tomo and drop
site.categories.fooin favor ofsite.categories.foo.posts.Btw: I created a wiki page (http://wiki.github.com/mojombo/jekyll/thoughts-about-a-new-version ) that discusses API-breaking changes. Please contribute to the page.
-
Right now only
linenoscan be passed to Pygments. I built a small patch for the highlight tag allowing general passing of options to Pygments. This can be used e.g. forstartinlinefor PHP code.http://github.com/koraktor/jekyll/commit/dd12900dd59b2a6526040fc7d1400f35a8a73fe8
Comments
For example using
startinlinewill cause PHP code to get highlighted without the need for<?php ?>.<% highlight php linenos startinline %> $inline = true; echo "This is inline PHP code."; <% endhighlight %>will result in highlighted PHP code and line numbers.
There are several other options, most of them are boolean. So the value defaults to
trueif an option is set. But you can also use e.g.encoding=utf-8ortabsize=2. -
Call it partials, subpages or whatever. I came to a point where I wanted to generate multiple similar sections in a page and found no way to achieve this with Jekyll. Instead of writing lots of "copy & paste" code, I'd like to use some kind of partial (like in Rails).
I created a new tag for this, called
import. It's more or less the same as theincludetag, but it usesJekyll::Pagefor rendering, not justLiquid::Template.http://github.com/koraktor/jekyll/commit/d599953be877bcd0a26581c2b11d2e77fcf1f968
Please note that this isn't perfect yet - e.g. you can't use this in Markdown or Textile files as line wraps and indentation are interpreted.
Comments
Another easier way to accomplish this is to make Post.output available to Liquid. But this still creates the "standalone" HTML files.
I would really appreciate any implementation of this feature on GitHub pages.To work around this on GitHub pages I let Jekyll render standalone HTML files and include them via prototype's
Ajax.Updater. This is far from optimal, but it works.Great idea, definitely needs tests. On hold until that happens.
michaelbarton
Thu Aug 27 06:05:11 -0700 2009
| link
Partials in jekyll would be great.
-
3 comments Created 6 months ago by jrkOrder of hierarchical/categories should match source folder layoutsuggestionxJekyll's inference of flat
categoryandtopicspaces from trees of parent folders (above and below_posts, respectively) is potentially useful. However, where categories are reflected in the generated URL structure (which they are by default, which is good), the generated directory structure should mirror the source structure, not be re-nested as some arbitrary ordering of categories.In my case, under my Jekyll root, I have:
projects/ aProject/ _posts/ anotherProject/ _posts/and in the generated
_sitethis yields:projects/aProject/year/month/day/some-postAND
aProject/projects/year/month/day/some-postwith the default url for the post (which gets inserted in templates referencing that post) being in reverse order, pointing to the latter:
aProject/projects/year/month/day/some-post
This is unintuitive in two respects:
- Generating the combinatorial set of possible paths to each post is unexpected.
- Having the default path/permalink include a different (perhaps arbitrary) hierarchical ordering of categories is unexpected and undesirable.
It is common to want some degree of hierarchy in a generated site. It only makes sense for the source hierarchy to be mirrored for posts (where it is mirrored at all -- I understand and respect that
topicdirectories are meant to be handled separately, and not reflected in the generated directory structure), just as it is for generated non-post pages and other content. Supporting this more predictably is arguably much more valuable than any clever tricks to interpret hierarchical filesystem layout as implying a flat tag space, and even where those tricks may be useful, I maintain that this is logically something which should distinguish topics (tags) from categories ("folders").Comments
Agreed, this shouldn't be too hard to implement (or test). If you or someone else wants to wrap up a patch (with tests) I'll be glad to merge it in.
jrk,
Is this still valid given the topics and tags changes that I've just pushed? Let me know, thanks!
Got this working at http://github.com/tomo/jekyll/tree/hierarchical_categories, last 2 commits.
The features and tests assumed that categories would show up in the URL in alphabetical order. I changed them to assume that categories should show up in the order specified by the directory layout or in the YAML.
- Generating the combinatorial set of possible paths to each post is unexpected.
-
I have been thinking to use the simplicity of Jekyll as a sort of a wiki. Many a times we come across the same problem over and over again and it would be good if it is documented somewhere. For example: How do I add new users to CentOS in a certain group? So I will assign my post some tags, let's say: linux, administration...and so on.
The problem arises when I want to search for certain tags let us say "linux" from 300 or so posts I have got. So, I was thinking if we append the tags to the end of the file name like: "2008-10-18-foo-bar-tag-ruby-nuby.textile" and get javascript to filter the links on the page.
Comments
For searching on one tag it seems like we could just generate tag indexes. E.g. for every tag you use, generate _site/tags/[tag]/index.html from some tag layout file.
But if you want to be able to go to /tags/linux/administration to get everything with both tags, then things could get crazy. When you have a post with 5 tags you'd have to generate 120 separate tag indexes, for that post's tags alone. For that many the space required isn't so bad, but I'm not sure how much it would slow jekyll down. If you have 7 or more tags on a post it starts to get ridiculous.
Tag index pages or a single page listing tags (like http://henrik.nyh.se/tag ) could work. If someone needs to find tag1+tag2, I'd suggest going with a single page and then using JavaScript to e.g. make /tag#tag1+tag2 do something clever.
-
When creating an atom/rss/sitemap xml it would be nice to pick up the last-updated timestamp from the file instead of relying on the date in the filename.
Comments
The problem with this is editing already published posts, you pretty much run into the same problem. I think using a
dateoption in the YAML front matter would be better.We've been discussing this in Issue #30. At the moment, the best way to do this is overriding date in YAML, as qrush suggested. Here's an example:
date: 2009-05-09 10:08:39 +02:00This will override the date parsed from the filename.
My fork gets time from the filename (2009-05-09_10-98-my-slug) or from
timein the YAML.I considered using file modification times but after some experimentation it didn't seem like a good idea. Would need some other form of metadata to account for imported old stuff anyway.
-
related_posts now adds in posts from nested _posts directories, and added
slug to text considered for classification (kanwei/jekyll)Comments
I'm not seeing any tests for this at all. Please add some to cover the functionality you're adding/fixing and I'll merge this in. Thanks.
-
From a conversation with nirvdrum:
09:41 nirvdrum: qrush_: FWIW, that's not exactly the behavior I was looking for. If I get some time, I'll work up a patch. I basically want to make the post available live, but not linked to. 09:47 nirvdrum: qrush_: I'd like to make the page live so I can hand the link out, but not have it appear in the atom feed, the index, categories, etc. 09:47 qrush_: Yeah, there's no 'draft' functionality yet 09:47 nirvdrum: qrush_: draft is a fine term. More descriptive than "unpublished" 09:48 jharuska: qrush_: as far as i know you still need to build the proxy? god damn students 09:49 qrush_: nirvdrum: I'd rather have a status option 09:49 qrush_: that's either 09:49 qrush_: ignore, draft, published 09:49 nirvdrum: qrush_: Agreed.
Comments
-
This is in the same spirit of Rails' `stylesheet_link_tag'. Introduce a style sheet tag which generates the link tag and appends on a query-string with the css file's mtime. This helps alleviate issues with the browser caching of the style sheet when the developer would prefer it be reloaded.
I've created a branch http://github.com/kyleburton/jekyll/commit/dccfb353fa3468a4e02718af49743fc71cddd263 with an implementation including unit tests.
Comments
This sounds like a great idea, but could you cut this into one patch that's cleanly based on top of the latest mojombo/master ? Not including stuff like commenting out the tags implementation (80fcd03) would be great too. Thanks!
kyleburton
Wed Jun 24 20:52:50 -0700 2009
| link
I re-forked your repo and applied my changes, the new commit should be:
http://github.com/kyleburton/jekyll/commit/8202c848cbf5c014fd189d45397425c00798981f
it should have a unit test with it as well.
Thanks,
Kyle
-
6 comments Created 6 months ago by jamesarosenPage rendering errors cause Jekyll to fail silentlyfixxIn server- and auto modes, Jekyll silently fails to build a page that has markup errors. The only error type I've been able to pinpoint so far is a syntax error in the YAML header, like:
--- title: something. with: weird, punctuation layout: default --- Some contentSaving that file just causes the following to be spit into the log:
[2009-05-23 15:29:25] regeneration: 1 files changedbut no HTML file is generated. Fixing the header (by putting quotes around the title value) causes the page to generate properly.
Comments
jamesarosen
Sat May 23 12:41:16 -0700 2009
| link
running
jekyll --no-autocauses the full stack-trace to bubble up, which is very helpful in debugging.
jamesarosen
Sat May 23 15:36:25 -0700 2009
| link
But it doesn't always work. I'm getting the following error from GitHub's build:
The page build failed with the following error: private method `chop!' called for nil:NilClassBut running
jekyll --no-autolocally (after cleaning out the_site/directory) gives this:Configuration from ./_config.yml Building site: . -> ./_site Successfully generated site: . -> ./_siteYeah, I've run into this as well. Definitely needs to be fixed.
jamesarosen
Sat May 23 17:47:54 -0700 2009
| link
Looking at the Maruku source,
chop!is only used in three places. One is for getting rid of trailing whitespace, one is for titles in links (a la[text](url "title")) and one is for titles in images. I think it's important that those titles are bounded by double quotes rather than single quotes.
jamesarosen
Sat May 23 18:04:08 -0700 2009
| link
Well, I fixed all the single quotes around titles, but that doesn't seem to be it. It must be a whitespace issue, b/c I have no images (except one done explicitly in HTML).
jamesarosen
Fri May 29 18:01:35 -0700 2009
| link
The underlying error seems to have been a problem in Maruku, since the page built fine once I changed the processor to RDiscount. It would still be nice to have those errors bubble up, though.
-
Jekyll doesn't like posts that are in unicode. FIX IT!
Comments
This is specifically in Pygments code, right? Fixed that in my jekyll fork and in http://github.com/henrik/albino/tree/master
Sorry, I should have been more specific. I was trying to merge in Claymore's changes for gitready that were written in Russian, and Jekyll was just failing silently on processing them. http://github.com/Claymore/gitready/tree/ru
-
3 comments Created 5 months ago by arnarAdd baseurl option to serve everything from a specific base URLholdxI will be using jekyll to generate my website, which is hosted under a specific URL prefix on my server ( http://www.hvergi.net/arnar ). Since I have nested folders with files, referencing other pages in common navigation elements is hard to do with relative urls. To let the Jekyll dev server reflect the url structure of the actual site, I added a new option called
baseurl. Passing this option with a string such as"/arnar"tells the Jekyll webserver to serve _site from that mount-point.The changes can be found in this branch
Comments
I can see how this might be useful for developing locally, but you actually serve your site with WEBrick? I think usually most people that host their own Jekyll sites just dump the generated files in their own folder and go from there. I'm willing to hear more about how you use this or others would use it if you're interested.
I use WEBrick to preview my site when I am making changes to it. When I am satisfied with the changes, I commit them to git and push them on to my server where they are served as static files from Apache.
Since my site is served from "/arnar" by Apache, I need to references this in various places, e.g. in CSS links (relative urls don't work since the master template might be used in various subdirectories). Having WEBrick behave exactly like Apache does with my configuration simply helps make the local previewing process smooth.
I could see Jekyll being very useful to college students building web pages hosted by their university. Most universities give limited web space to students, and this usually doesn't include the ability to install database-driven content management systems. These sites are also typically deployed in non-root locations, which requires some tweaking without the baseurl option described by Anar.
-
15 comments Created 5 months ago by imanelProvide support for HAML and SASSsuggestionxMore and more people uses HAML and SASS from nex, so I think it will be good thing to implement it in Jekyll. http://github.com/henrik/jekyll/tree/master have it already in his tree, but it's old and unsuported version of Jekyll. So will it be a problem to pull this functions from his repo? If there's some code-blokers I will willingly help with enhance code.
Comments
The problem is that GitHub pages cannot allow people to execute arbitrary Ruby code. In other tickets I've mentioned that the best way to do this is to have a 'secure' mode for Pages and a non-secure mode that is more flexible. I haven't seen this implemented cleanly anywhere that I can merge into the core yet.
I'm sorry, but still don't understand - what have Jekyll implementation to do with GitHub pages?
imanel, Jekyll is used for GitHub pages. My version of Jekyll wasn't forked that long ago, and has been updated once or twice since, but my additions don't come with tests.
Secure/insecure could be interesting.
Sorry - didn't know:/
About secure/insecure mode - there's another way. At this time Jekyll have 167 forks - mostly adding one or two small functions, sometimes something more. What if you could add lib directory and put into your application any plugins you want? http://github.com/tomash/jekyll/tree/per-site-libfiles have something like that - in standard it's normal Jekyll, but You can provide --plugins option so everything in _lib will be executed. GitHub will run without this option, but users will be able to create Jekyll-ecosystem of plugins instead of useless(sorry) forks... How about that solution?PS: @henrik - don't know how I did that, but I was sure that your last update was 8.04 ;) Anyway - is there any chance to update to newest version soon?
Jekyll is small and hackable enough that I think I prefer forking and modifying to a lib/plugin solution. It's definitely tricky to figure out what fork to use, or if someone has already added functionality you want, but we could perhaps use the wiki to make that easier. http://wiki.github.com/mojombo/jekyll/sites does that to some extent.
As to my fork, feel free to fork that and update to latest Jekyll ;) I might do that next time I hack on it, but that may not be for a while.
+1 for Haml and Sass.
I don't accept the security argument here. The point being here is to use Haml as markup generator, not templating engine for replacing Liquid.
So maybe the point/aim is: have/get/make a Haml parser that ignores "-" and "=" ruby code blocks (just a dumb html generator) and make it work with Liquid. That would be secure enough and at the same time let us be freed from HTML when writing our pages -- I mean, come on, it's 2009 ;)
Like, here:
http://lab.hamptoncatlin.com/play/with/hamlTry putting (for instance) {{ liquid stuff }} somewhere in the source haml and generate.
And from HAML documentation (options for rendering engine):
…or by passing an options hash to Haml::Engine.new. Available options are::format
Determines the output format. The default is :xhtml. Other options are :html4 and :html5, which are identical to :xhtml except there are no self-closing tags, XML prolog is ignored and correct DOCTYPEs are generated.:escape_html
Sets whether or not to escape HTML-sensitive characters in script. If this is true, = behaves like &=; otherwise, it behaves like !=. Note that if this is set, != should be used for yielding to subtemplates and rendering partials. Defaults to false.:suppress_eval
Whether or not attribute hashes and Ruby scripts designated by = or ~ should be evaluated. If this is true, said scripts are rendered as empty strings. Defaults to false.How many internets do I win? ;)
After my Engine related refactoring (Chrononaut@dc70e3b), adding Haml engine support was just a few lines of code away (I guess this proves that the refactoring was useful). The Haml engine implementation can be viewed here: Chrononaut@2dc41d1. The test shows that the Ruby evaled code indeed is suppressed.
I think that at least the refactor commit should be pulled in - it makes the Site class a lot cleaner.
It is already really easy to use compass with Jekyll for Sass, as described in my short blog post (http://chrononaut.net/2009/05/08/using-compass-with-jekyll.html). Simply let compass automatically compile the Sass locally, no additional support from Jekyll is required.
Chrononaut, that looks like a nice refactoring. How does it handle access to site etc from e.g. Haml templates? From a quick look at the code, it's not handled. What I did was render in a context and use a custom class similar to OpenStruct for that context:
http://github.com/henrik/jekyll/commit/b9dea95f1ed100d5786d3cb580fcab968ab3b41f
http://github.com/henrik/jekyll/commit/8870dde625e850c2b173ed97d30de5d34e8ec61b
Actually, accessing site data isn't a problem, just use Liquid tags. I had to add one line to convertible.rb to make Jekyll support Haml layouts: Chrononaut@1baf081
I've converted my own layouts to Haml, one example can be viewed here: http://github.com/Chrononaut/chrononaut.net/blob/d919c7428b6dc1eab054a4dc79125346fd046b01/index.haml . Works just fine.
Liquid tags works for Haml posts/pages as well as layouts. By using Liquid everything should be just as safe as before since no Ruby evals are done from the Haml templates. So this shouldn't be a problem to run on GitHub pages.
Chrononaut: Ah, get it, thanks.
In my fork, I'm moving towards removing Liquid entirely and only using Haml, without suppressing eval, since I got frustrated working within the Liquid limitations. But this is for running on my own server, not as GitHub Pages.
mattscilipoti
Wed Jun 17 20:36:31 -0700 2009
| link
+1 for haml/sass support in GitHub's Jekyll
svenfuchs worked on a safe mode for haml (and erb as well), maybe worth looking into: http://github.com/svenfuchs/safemode/tree/master
-
4 comments Created 5 months ago by jamesarosenhighlighting causes RDiscount to stop parsingfixxComments
jamesarosen
Tue Jun 02 06:59:12 -0700 2009
| link
Running jekyll on this post causes some strange behavior. Everything is fine up until the
{% highlight %}blocks. Pygments takes care of turning those into<pre>s just fine, but RDiscount stops processing right after the first block. If I remove the first block, RDiscount turns the next paragraph into a<p>, but stops processing after the following{% highlight %}block. I've tried removing the content from the code blocks and changing the highlight language; nothing works. I always end up with an absolute mess at the end of the post.
jamesarosen
Tue Jun 02 07:00:20 -0700 2009
| link
This is true of all posts in that site that use highlighting. I just didn't notice it with the others because I had very minimal markdown after a highlight block.
jamesarosen
Tue Jun 02 07:02:04 -0700 2009
| link
Using RedCloth seems to produce better results.
geoffgarside
Thu Jun 04 14:50:54 -0700 2009
| link
Try updating RDiscount, I believe the bug which caused it to incorrectly parse the HTML generated by Pygments has been fixed now.
-
3 comments Created 5 months ago by bmalandRemove optional rendering engines (RedCloth, maruku) from the dependency listsuggestionxI don't think it's a good idea to make optional rendering engines forced requirements. The current main issue with Jekyll's Ruby 1.9 compability is the RedCloth 4.1.0 requirement (4.1.9 is the first RedCloth version that works with Ruby 1.9). Thus, people that doesn't even want to use RedCloth for their markup currently can't install Jekyll because of this (Ruby 1.9 users, that is). I don't see any good reasons for keeping them as dependencies, we could just rescue LoadErrors and print installation instructions instead.
(I'd be happy to implement the necessary changes, if they would be accepted into the mainline)
Comments
I don't fully understand...so how will textile/markdown get rendered if we're not using the external libraries? I think it would be most unwise to implement an engine for either inside of Jekyll.
I'm up for any sort of work related to fixing this problem, it's definitely a huge pain point.
Maybe I didn't get my idea across properly (I'm not a native speaker) - I'll try again. :)
Sure, I think these libraries should be used to render the pages, but they aren't really requirements for using Jekyll. If I want to use markdown, and for some reason prefer rdiscount, I don't need Jekyll to install RedCloth and maruku as dependencies as I won't even use these other engines.
So instead of having these as dependencies for installing the gem, they could be run-time dependencies. RDiscount actually works the way I suggest right now. If you chose RDiscount in _config.yml without having it installed, you will simply get a LoadError telling you how to install it. That's how RedCloth and maruku should be treated as well, imo.
-
Here's a patch to sort tags by key. I use it to display a list of tags (and posts) in nice alphabetical order -- or to display an alpha-ordered tag cloud.
http://github.com/elstudio/jekyll/commit/4cc2c97d5f4ddf13986fba021dab9fcce8061529
One caution: This implementation stashes tags into an RBTree. So it adds a dependency for the rbtree gem. Gemspec is updated accordingly.
Works for me, but I could see how that might be less of a good choice for a GitHub pages implementation.
I'd welcome suggestions for how to do this better -- perhaps without the native-code dependency. Or even in liquid!
Comments
Definitely a cool idea. I'm not so sure about adding RBTree as a dependency though, pretty much for the reasons you said. I think this is more of a feature than a fix too. If others like it, perhaps we can merge it in, but it definitely needs some tests first.
-
I'd like the ability to put a future post date and then not have jekyll generate a post from that until the date has past.
My ideal use would be to do a commit then push and, as well as the post-push hook, a daily cron job that regenerates the site to pick up the future dated posts as that date passes.
Has this been mentioned before? If no one's got a fork that does it already I'll have a hack myself, but didn't want to waste time if it's already been done by someone.
Comments
-
0 comments Created 5 months ago by bendersEnhancement to --server option to allow optional bind addressfeaturexThis is a quick modification to the --server option so that it will accept an optional bind address in the form of host:port. The default value value is still to pass nil (which binds to both the IPv4 and IPv6 wildcards in WEBrick).
http://github.com/benders/jekyll/tree/master at 84142f0, or
http://github.com/benders/jekyll/tree/84142f0b900e5618f95a1ba15b09005890b44a23Comments
-
0 comments Created 5 months ago by qdotAllow Date+Time sorting and entry in yaml headerfeaturexAs an alternative to sorting by slug, allow the user to enter a date: field in the yaml header, like so:
title: Generic Post Title
date: 2009-06-21 18:07:09 -08:00
layout: post
Then, after the yaml is loaded, if this field exists, use it instead of the date pulled from the file name.
I've already implemented this on my fork, in a very rudimentary way (doesn't check date validity or anything). The commit URL is:
http://github.com/qdot/jekyll/commit/55369fe98f4a79bb3c541debfa9cd49a2f37a437
Comments
-
5 comments Created 4 months ago by nirvdrumSupport Less for stylesheet processingfeaturexIt would be nice if jekyll allowed the use of Less for stylesheet processing. I've written up code to do such at: http://github.com/nirvdrum/jekyll/tree/integrate_less
The shoulda tests and Cucumber features should make clear what's going on. The gist of it is that a file named "whatever.less" in the "stylesheets" directory will get transformed to "site/css/whatever.css". It support arbitrary nesting of subdirs in the "_stylesheets" directory to support CSS hierarchy organization.
I'm open to suggestions on the "stylesheets" and "site/css" naming convention.
Another thing to note is that if there is a "css" directory at the root level, the contents will be merged during transformation. As such, I've left the "css" directory in tact in the test sources. The screen.css file could just as easily be moved into the "_stylesheets" directory, where it will not be processed, as it does not have the ".less" extension.
Comments
Hi,
I don't understand why the _stylesheets directory is necessary. Why not just run LESS over any file with a .less extension, just as Textile is run over .textile files and Markdown on .md/mkdwn/markdown files?
Maybe I'm missing the point, but it seems to me we should continue to use the convention of letting the file extension dictate the filter used in the Convertible module, and skip all the _stylesheets directory logic. My same argument should hold true for SASS and HAML as well.
The stylesheets directory is a parallel to the posts directory. As far as I know, jekyll only runs textile and markdown over files in the posts directory (I haven't actually tried anywhere else). LESS will only be be run over files with a .less extension, so SASS files should be able to be placed in stylesheets without any problems.
I suppose the alternative is to allow them to be placed anywhere and then not publish the .less files.
Okay, I understand your thinking now, but actually Jekyll runs Markdown or Textile over any file with the corresponding extension, not just posts. This is done in the Convertible module that is included and called from the Page and Post modules.
An example of this would be my about.textile page on my site:
http://github.com/appden/appden.github.com/tree/master
Gotcha. That's a feature I haven't used. So, I'm not opposed to the proposed change. It'll require some reworking of the patch though.
I've implemented Less integration in my fork in a dumb way (see it here around line 200). This follows the simple rule of the extensions dictating the filter. Would this, in principle, be a suitable solution? (this is not a pull request, but an implementation suggestion)
-
5 comments Created 4 months ago by jeffrydegrandepermalinks are incorrect for files other than htmlfixxI have templates to render files like atom.xml and sitemap.xml
When using the defaults Jekyll renders them as atom.html and sitemap.html.
I tried to get around it by putting permalink: /atom.xml in the YAML frontmatter but that in turn resulted in paths like /atom.xml/index.html
For files without the .html extension the permalink should be the original filename
I have a patch on my fork at http://github.com/jeffrydegrande/jekyll/tree/master
Comments
I've started noticing this too. It didn't happen with earlier versions of jekyll.
In my opinion, we shouldn't need hard coded checks for the html extension. Instead, let Jekyll assume that any permalink that ends with a slash should create a directory and put an index.html file there.
I.e.:
Permalink "/foo/bar/" corresponds to the file "foo/bar/index.html"
Permalink "foo/baz.xml" corresponds to the file "foo/baz.xml" (edit: was /baz.xml)
Permalink "/atom.xml" corresponds to the file "atom.xml"
Checking for the trailing slash is exactly what web servers do, so this makes good sense to me.
I made a patch in http://github.com/vilcans/jekyll/tree/automatic-index
I'd also like it to work on files without specifying the permalink.
If I have a file called atom.xml, I need to put "permalink: /atom.xml" in it, or it will be generated as "_site/atom/index.html". I haven't fixed this, but the main problem is fixed as described above.
As I understand it, the 'pretty' permalink creates a directory with index.html. Previously, stating at static relative url like '/atom.xml' would just use the permalink specified verbatim. So it seems like something is just broken. I think the page processor seems to want an 'html' suffix or it creates a directory using mkdir_p.
Yeah, just read and applied the OP's patch and all is good.
-
0 comments Created 4 months ago by assafRuby 1.9 compatibility for syntax highlightingfixxIn jekyll/tags/highlight.rb, lines 24-30 attempt to join array into string by calling super.to_s (in two places). In Ruby 1.8 the call to to_s is the same as join, in 1.9 it's the same as inspect.
Fixed by changing to_s to join:
def render(context) if context.registers[:site].pygments render_pygments(context, super.join) else render_codehighlighter(context, super.join) end endComments
-
3 comments Created 4 months ago by kirbysayshiWay to link to posts without using a permalink?featurexForgive my ignorance if it exists, but it seems that there is no way to link to a post without using a hard link (that is, http://domain.name/style/of/permalink/name-of-file.html ).
Am I wrong?
In an ideal world, I think post links should be something like: "text to display as link":2009-06-30-name-of-file.textile, which would then be converted to permalinks.
Comments
This seems like a neat feature...i think a better way to implement this would be through a liquid tag since different markup languages can be used. Hack it up and I'll gladly merge it in. :)
kirbysayshi
Wed Jul 08 11:42:27 -0700 2009
| link
I'll give it a try for sure... although I don't know Ruby, and this would be my first collaborative git project. But I can learn.
Question though, if it were a liquid tag, what do you think it would look like? I'm thinking:
{% link 2009-06-30-name-of-post-file %}
notice the lack of extension, to provide for different markup languages.
This is something I've felt has been missing since I started using Jekyll. I've created a branch on my fork with a patch to add this feature.
http://github.com/tatey/jekyll/tree/permalink_liquid_tag
With wiki documentation
http://wiki.github.com/tatey/jekyll/liquid-extensions
Please let me know if this is suitable.
-
I want a simple way to add images to my blog posts without going through the hassle of resizing the image and writing height and width attributes in the HTML
tag, so I implemented a Liquid tag called image. If the image's dimensions are larger than a maximum width or height, it will create a new image and save that version in the output directory.
I guess the test makes it clear:
Scenario: Shrink image that is wider than threshold Given I have an "index.html" page that contains "{% image test.png max_width=20 %}" And I have an 100x50 image file "test.png" When I run jekyll Then I should see "<img src=\"/test_20x10.png\" width=\"20\" height=\"10\" />" in "_site/index.html" And the _site/test_20x10.png file should exist And the _site/test.png file should existThis can be used for inline images or thumbnails. It's possible to specify a template for the
tag, so you can add style to it and make it a link to the full-size image etc. All of this depends on the RMagick gem.
The implementation is here: http://github.com/vilcans/jekyll/tree/image_tag
WARNING: This is not finished and I may rebase it later on. Note that it is not secure and it's probably possible to write evil input that will be able to read or write any file. Not good for gh-pages.
If there's a chance that this will be included in the main branch, I'll take the time to fix these shortcomings. Is anyone interested?
Comments
This sounds like another good reason to have the
secure: falseconfig option.Or it can be secured so it disallow writing to files outside the _site directory or reading from files outside the source directory.
The {%include%} tag has some similar logic. But I'd rather not have the requirement that the images must be in a specific directory. Does anyone know an easy and secure way to check whether a file is in any subdirectory of a specific directory?
I think limiting images to an _images folder is certainly acceptable. I pretty much have the same thing in all of my jekyll sites at the moment.
Perhaps default to an _images folder and allow a configuration option to change it...provided it doesn't go up any directories.
-
It appears that I cannot start a line with an html element... It gives a formatting error. Any ideas?
Comments
Could you give an example? And moving this to the mailing list would be better: http://groups.google.com/group/jekyll-rb
-
I'd like to have proper typographic punctuation everywhere. This includes, say, places where I include post titles in layouts. A smartypants filter would let this happen.
Here's an example. It'd be nice to write this.
<h1>{{ page.title | smartypants_educate }}</h1>And have it do what you'd expect.
Comments
BTW, I am working on a patch for this, complete with tests and documentation.
A patch is at http://github.com/kr/jekyll/commit/smartypants-filter.
>I'm now working on documentation in http://wiki.github.com/kr/jekyll.
>Okay, github apparently doesn't like a URL at the end of a sentence. Let's try again.
http://github.com/kr/jekyll/commit/smartypants-filter
http://wiki.github.com/kr/jekyllThis is awesome—I’m looking forward for this to be merged into the master tree. Thanks for working on this. (:
-
0 comments Created 4 months ago by cldwalkerrendering issues with pygments and redclothquestionxUsing jekyll 0.5.2/0.5.3 and redcloth 4.2.1/4.2.2 I'm coming across the notextile/pygments bug mentioned in the wiki. Basically multiple versions of the pygmented code are appearing, one nested inside the other. What versions of these gems work for using pygments inside notextile tags? This hasn't been working for me locally for at least one week but I just noticed this also happening on my github blog yesterday.
Any help appreciated. Thanks.Comments
-
1 comment Created 4 months ago by mislavCertain pages are rendered before all site posts have been processedfixxConsider the following site structure:
blog/index.html category/_posts/...Due to the recursive nature of
Site#transform_pagesmethod, "blog/" directory and pages under it are processed before posts from "category/_posts/" directory have been read. That results in pages under "blog/" having an incomplete list of posts in "site.posts" collection.I fixed this in mislav@9691388
With this patch, all "_posts" directories are processed before execution has even entered
transform_pages. This ensures that all posts are indeed read before any of the pages are processed. It also results in a cleaner implementation.Comments
-
jekyll/sites.rb checks that the first 3 chars are '---' but this doesn't mean that it will match a line like:
---it could also match any of:
---- ------------- ---ZOMG!I use the former in non yaml files and it causes jekyll to mess up.
I would:
A) Look for /^---\s/
B) Catch and bypass (maybe with a warning) files that have invalid YAML.Comments
Have you tested it for this occurence:
---- ------------- ---ZOMG!
I have not tested it but it seems your fix would still allow these ones. Fix should be more like a case in XHTML where every starting tag has a closing tag and the starting tag being "---"
Good effort though.
There is another way to fix it but that would require a considerable change. Have a look at nanoc(http://nanoc.stoneship.org/). It uses a seperate yaml file so instead of a yaml header one could just have a seperate yaml file. The only downside is every post would have two files, one for markup and one yaml file.
-
If you enter only a single category for a page, it seems to be parsed as a string instead of an array. Side effect of this is that you can't use size reliably on it, if there's only one category you get the string's size instead of 1.
Comments
-
Hi,
Wouldn't it make sense to set site.source to the absolute path of the dir where the jekyll command is run (if no config['site'] is specified).
I had some templates where it complained about non existing ./_includes - not sure when exactly though - until I specified the source dir in my config.
Comments
Hmm, this probably makes sense. If you could whip up a patch or a good way to test this I'd be up for it.
christianhellsten
Mon Oct 26 05:58:47 -0700 2009
| link
This is easy to fix. I had problems using includes from within includes (in the _includes directory).
I fixed this issue by changing line 38 in http://github.com/mojombo/jekyll/blob/master/lib/jekyll.rb from:
'source' => '.',to:
'source' => Dir.pwd,This change breaks ./test/test_configuration.rb. To fix the test change line 6 in test_configuration.rb to:
@path = File.join(Dir.pwd, '_config.yml')I can create a patch if required.
-
When trying to highlight code with pygmentize on windows instead of outputting highlighted code "Liquid error: uninitialized constant Fcntl::F_SETFD" is written. This appears to be due to the fact that the open4 library is not supported under Windows and that is what is used to call the executable.
The solution I have come up with is to check to see if the code is being run under windows and if so use the IO.popen function to pipe in the pygmentize content in a way that will work under windows. The code that has worked for me can be found at:
http://github.com/charliek/jekyll/tree/masterThis is the first ruby code I have ever written, but I tested it on a simple test site and it worked under both linux and windows. Also if you would prefer me send this new code in a different manner please let me know.
Comments
-
Please may we have a facility in _config.yml to ignore directories?
Comments
jackowayed
Tue Oct 27 15:19:10 -0700 2009
| link
I second this. My first thought of how to do it was some kind of .jekyllignore, either one in the root that would tell it what to ignore, or even just have it be that you ignore any dir that has a .jekyllignore file.
My use case is that I have a sass/ directory and a rake task that builds the files and puts it in css/. I really have no need to put sass/ in _site/
-
1 comment Created 3 months ago by appdenPaginator creates extra empty page if all_posts.size % per_page == 0fixxThe logic Pager.calculate_pages is flawed, and Site:paginate_posts tries to correct for this by adding 1 to the number of pages.
Pager.calculate_pages only needs one line that returns
all_posts.size.fdiv(per_page.to_i).ceiland that increment can be removed from Site:paginate_posts (is that how you refer to a private method?).I barely know Ruby, so please let me know if I made a mistake. Thanks.
Comments
-
1 comment Created 3 months ago by h3hAdd a multiviews feature for use with Apache's MultiViews featurefeaturexComments
Another implementation, but without tests: http://github.com/henrik/jekyll/commit/1d42b39f70415fc69f80e6736649bc570ff4e2cb
-
Files that land in _site persist even when their originating source is moved away.
Not a big deal when you can just rm -rf the contents, a bit annoying for things like github pages (http://support.github.com/discussions/repos/1202-pages-doesnt-clear-out-cruft)
Comments
This did bite me as well:
http://support.github.com/discussions/repos/1306-user-pages-containing-obsolete-files-howto-clean-upavoid-this-situationOne simple quick-fix might be to allow the owner of the user page to trigger a wipe of the jekyll generated content with a subsequent full pull of all user-page content.
-
0 comments Created 3 months ago by mrflipCrash if directory and file with same name collidefixxSuppose my template contains a directory:
index.html install/usage.textile install/dependencies.textile _site/index.html _site/install/usage.textile _site/install/dependencies.textileand I later rename / rearrange the files -- Since jekyll doesn't clear out orphaned files from _site,
index.html config/usage.textile config/dependencies.textile _site/index.html _site/config/usage.textile _site/config/dependencies.textile _site/install/usage.textile _site/install/dependencies.textileIf I now add a file named 'install' jekyll will be unable to compile because the destination file and the directory '_site/install' collide.
This is no big deal on a local install, but can cause problems in a server environment: http://support.github.com/discussions/repos/1202-pages-doesnt-clear-out-cruft
Comments
-
0 comments Created 2 months ago by technicalpicklesLiquid parsing of blog doesn't give very good errors when it failsfixxSo, I'm hanging out, running jekyll on my blog, when all of a sudden...
$ jekyll --pygments Configuration from ./_config.yml Building site: . -> ./_site /gentoo/usr/lib/ruby/gems/1.8/gems/liquid-2.0.0/lib/liquid/block.rb:74:in `create_variable': Variable '{{' was not properly terminated with regexp: /\}\}/ (Liquid::SyntaxError) from /gentoo/usr/lib/ruby/gems/1.8/gems/liquid-2.0.0/lib/liquid/block.rb:34:in `parse' from /gentoo/usr/lib/ruby/gems/1.8/gems/liquid-2.0.0/lib/liquid/document.rb:5:in `initialize' from /gentoo/usr/lib/ruby/gems/1.8/gems/liquid-2.0.0/lib/liquid/template.rb:58:in `new' from /gentoo/usr/lib/ruby/gems/1.8/gems/liquid-2.0.0/lib/liquid/template.rb:58:in `parse' from /gentoo/usr/lib/ruby/gems/1.8/gems/liquid-2.0.0/lib/liquid/template.rb:46:in `parse' from /gentoo/usr/lib/ruby/gems/1.8/gems/mojombo-jekyll-0.5.2/bin/../lib/jekyll/convertible.rb:69:in `do_layout' from /gentoo/usr/lib/ruby/gems/1.8/gems/mojombo-jekyll-0.5.2/bin/../lib/jekyll/post.rb:189:in `render' from /gentoo/usr/lib/ruby/gems/1.8/gems/mojombo-jekyll-0.5.2/bin/../lib/jekyll/site.rb:141:in `read_posts' from /gentoo/usr/lib/ruby/gems/1.8/gems/mojombo-jekyll-0.5.2/bin/../lib/jekyll/site.rb:140:in `each' from /gentoo/usr/lib/ruby/gems/1.8/gems/mojombo-jekyll-0.5.2/bin/../lib/jekyll/site.rb:140:in `read_posts' from /gentoo/usr/lib/ruby/gems/1.8/gems/mojombo-jekyll-0.5.2/bin/../lib/jekyll/site.rb:178:in `transform_pages' from /gentoo/usr/lib/ruby/gems/1.8/gems/mojombo-jekyll-0.5.2/bin/../lib/jekyll/site.rb:96:in `process' from /gentoo/usr/lib/ruby/gems/1.8/gems/mojombo-jekyll-0.5.2/bin/jekyll:129 from /gentoo/usr/bin/jekyll:19:in `load' from /gentoo/usr/bin/jekyll:19I'm at a loss about where to go about fixing this syntax error.
One suggestion would be to rescue
Liquid::SyntaxError, and display a message about what was being processed at the time. Unfortunately, Liquid does not seem to give any more detailed information than the fact that there was a syntax error, and what the error was, ie no line info.Comments
-
I presume I did something wrong on the installation ...but this should never happen.
$ jekyll WARNING: Could not read configuration. Using defaults (and options). No such file or directory - ./_config.yml Building site: . -> ./_site /var/lib/gems/1.8/gems/mojombo-jekyll-0.5.4/bin/../lib/jekyll/site.rb:132:in `read_posts': undefined method `each' for nil:NilClass (NoMethodError) from /var/lib/gems/1.8/gems/mojombo-jekyll-0.5.4/bin/../lib/jekyll/site.rb:125:in `each' from /var/lib/gems/1.8/gems/mojombo-jekyll-0.5.4/bin/../lib/jekyll/site.rb:125:in `read_posts' from /var/lib/gems/1.8/gems/mojombo-jekyll-0.5.4/bin/../lib/jekyll/site.rb:178:in `transform_pages' from /var/lib/gems/1.8/gems/mojombo-jekyll-0.5.4/bin/../lib/jekyll/site.rb:96:in `process' from /var/lib/gems/1.8/gems/mojombo-jekyll-0.5.4/bin/jekyll:129 from /var/lib/gems/1.8/bin/jekyll:19:in `load' from /var/lib/gems/1.8/bin/jekyll:19Comments
Could you provide the site or any other information so this can be reproduced? Thanks.
-
Is it possible to order my posts not by date but by some other number used as opposed to the date? I have studied the code and I do not think it is possible but I was just wondering if someone has found a hack for it. I know this is completely against jekyll's philosphy but I am actually using it for something innovative. I can make the changes myself but if my issue is closely related to someother open issue then I would do and in a way give something back to the community
-- andHapp
Comments
I am trying to create http://www.h3rald.com/ (this has been done in nanoc another Jekyll like blog creator) like static site which is not similar to a blog. My problem was that Jekyll creates the posts as per the date specified in the file name. Therefore, in order to mess about with the ordering one needs to change the dates in the file name to ensure they are in the right order after compilation. That's exactly what I did.
I am sure there is a better fix rather than hacking the file names but I would leave it like this now and revisit it later.
-
markdown in jekyll make inline links not-inline when in posts.
1 comment Created 2 months ago by dventimiNot sure what I'm doing wrong, but when I make an inline link in index.markdown, it's inlined, but when I inject post content into index.markdown using {{ post.content }} and put an inline link into a _posts/ file, the link gets separated from the surrounding text by closed and opening paragraph elements, as seen here: https://www.msu.edu/~ventimig/index.html
Comments
-
rr required for testing, but not listed in requirements
0 comments Created 2 months ago by kmayerComments
-
Pygments required for testing, but not listed in requirements
0 comments Created 2 months ago by kmayerComments
-
Is it possible Jekyll can support xml2rfc as a translator? Then we could host RFC specs on GitHub: Pages.
http://xml.resource.org/authoring/draft-mrose-writing-rfcs.html
Comments
-
Using a ruby syntax highlighter library instead of calling the pygments executable
0 comments Created 2 months ago by YouxI've took the pygments/highlight files from your project to use in a project of mine, where I generate documentation, and noticed something : executing pygments as an external program each time has a huge overhead. (if I remember well my Cygwin days, it may be even worse on windows)
Basically, generating all pages (about ~2000-3000 syntax highlighted blocks in total, which is quite extreme) took 7 minutes on my C2D Macbook.
I then switched to coderay (a pure ruby library that works the same as pygment, it supports fewer languages but the lexer syntax is nearly the same as pygments'). My generation time shrank from 7min to... 15s.
I know there is also a 'syntax' gem, but it has fewer languages, and 'ultraviolet' which I could not get to install (based on textpow which is based on oniguruma... lots of dependencies but it supports more languages).
Comments
-
At present, when using Pygments to highlight code, your code is only wrapped in pre tags.
<div class="highlight">
<pre>
def hello
puts "hello"
end
</pre>
</div>Semantically, however, best practice is to first wrap code in <code> tags, with an optional class which contains the specific language used in the given code block. In fact, the HTML5 spec has adopted this practice and it will be part of the final specification.
<div class="highlight">
<pre>
<code class="ruby">
def hello
puts "hello"
end
</code>
</pre>
</div>Interestingly, when Pygments is not enabled, Jekyll will render code blocks using codehighlighter-style markup, which does include <code> tags correctly.
Here's a fork which updates Pygments output to include <code> tags and thus be more semantic and improve HTML5 compliance:
http://github.com/mokolabs/jekyll/tree/add_code_tags_to_pygment_output
(Ideally, this change should be pushed back to albino.rb, but since that's a core part of GitHub, mojombo and friends may be understandably slow to accept a patch on that.)
Comments
-
There is a dependancy check in tests/helper.rb that is looking for RedCloth = 4.2.1 where it is >=4.2.1 everywhere else.
I changed test/helper.rb to reflect this.
You can pull it from http://github.com/mgriffin/jekyll or else it is only a one character change in the file.Comments
-
The FrontMatter is terminated on any occurrance of '---' within the YAML, even if it's in the middle of a line, e.g:
--- foo: uiae --- uiaewill be truncated and returns
{'foo' => 'uiae ' }.I fixed it in my fork: karottenreibe/jekyll@f9673c4
Comments
karottenreibe
Sun Oct 25 12:57:11 -0700 2009
| link
Correction: now I fixed it: karottenreibe/jekyll@fe3c094
The earlier version would convert
--- foo: bar ---into
{ foo => 'bar ' } -
I've added a converter for importing the xml generated from a wordpress.com export. How should I go about getting this pulled into Jekyll?
Comments
-
Cannot use accentuated characters in category names
0 comments Created 24 days ago by jlfenauxIs there a way to use accentuated characters like é or any UTF8 character in category names?
Comments
-
Hi,
I've extended the wordpress converter to grab the category and tag names for the posts.
You can find the code in the master branch at http://github.com/dazoakley/jekyll if you're interested in the changes (http://github.com/dazoakley/jekyll/commit/110ef37213f1f30107df32ddaad2fb58610929bb).
>Thanks,
Daz
Comments
-
WEBrick serves JavaScript with wrong Content-Type
0 comments Created 15 days ago by christianhellstenFirebug refuses to display the script debugger pane because WEBrick serves JavaScript with an incorrect Content-Type header.
This can be fixed by changing bin/jekyll as follows:
139 mime_types = WEBrick::HTTPUtils::DefaultMimeTypes 140 mime_types.store 'js', 'application/javascript' 141 142 s = HTTPServer.new( 143 :Port => options['server_port'], 144 :DocumentRoot => destination, 145 :MimeTypes => mime_types 146 )Comments












I completely understand. I was just faced with this dilemma when porting my blog over from wordpress to jekyll. I ended up making a lot of little pages for separate categories for the time being. I would like some sort of DSL that is run to do this though.
I used Jekyll as a library from a Rakefile to be able to do just that. Works for the moment, but if definitely would be nice to have an easier way.
I doubt though that this could be achieved from within normal Liquid markup code. Maybe something for the config file?
I have already implemented generation of "category index" pages in my own fork (http://github.com/matflores/jekyll).
>It's not as flexible as it should be (I'm currently relying on the existence of a _layouts/category_index.html layout file and indexes are always generated at /category/xxxx/index.html), but it might work as a starting point and I'm willing to help in implementing this in core Jekyll if needed.
mattmatt: "I doubt though that this could be achieved from within normal Liquid markup code."
Wouldn't it be possible to do markup like:
I mean we create a new Liquid tag called output that writes to a specific file.
I don't know anything about Liquid, so I have no idea if this is feasible.
Yes, that might work, though I'd find it confusing that a template file generates lots of other template files.
I've been thinking this over, and I believe vilcans solution is as nice as I can come up with. I suggest that like layouts and posts, these extra pieces could go somewhere like _templates.
@tomafro There's an _includes dir already.
The question is, do you think of a template as being the same as an include? I'm not sure...