latest 20 messages by nounch

+ [2014-02-11T23:20:19Z] nounch SylvieLorxu: Godd night!
+ [2014-02-11T23:18:35Z] nounch SylvieLorxu: Sure, try on a copy first, of course.
+ [2014-02-11T23:18:05Z] nounch Also, I do not know if Ruby guarantees to read files in the file system sorting order.
+ [2014-02-11T23:17:37Z] nounch Well, renaming does not make much fun when you have maxed it out.
+ [2014-02-11T23:16:20Z] nounch SylvieLorxu: What if you have 1.markdown, 2.markdown, ..., 111.markdown, 222.markdown, ... ?
+ [2014-02-11T23:15:31Z] nounch So keep in mind, that when you host your project on a BSD machine with some quirky FS, your sorting will be broken. But that is unlikely, of course.
+ [2014-02-11T23:14:29Z] nounch You have to use a constant naming scheme that makes ruby read the files in a certain order then (basically you move the sorting order responsibility to the file system).
+ [2014-02-11T23:12:49Z] nounch What if there is a `products' subdir in `products'?
+ [2014-02-11T23:11:54Z] nounch SylvieLorxu: How?
+ [2014-02-11T23:11:48Z] nounch SylvieLorxu: Great!
+ [2014-02-11T23:11:10Z] nounch But blog titles should not have (mis)use cryptic chars, in general.
+ [2014-02-11T23:10:45Z] nounch Basically, it frees you from having to have any (*almost) naming convention. *almost means you cannot use underscores in your titles at the moment (and you are limited to the set of characters that your file system lets you use for dir names).
+ [2014-02-11T23:08:42Z] nounch Additionally you get `Previous'/`Next' links for posts for free.
+ [2014-02-11T23:07:55Z] nounch Think about it, it is not. Your files live in a directory with any names they want and you manually specify the sorting order by adding them to `sorting.yml'. It is simply a matter of workflow. Whenever you write a new post, you have to do one additional piece of work: You add its name to `sorting.yml'.
+ [2014-02-11T23:05:42Z] nounch SylvieLorxu: Whenever you decide to reorder your posts, you simply switch the lines in `sorting.yml'.
+ [2014-02-11T23:05:15Z] nounch SylvieLorxu: Not, you do not need to write any iterator yourself. Simply drop your files in a directory (each file has the name `index.markdown', but lives in a directory which has the post name), then you write the name of every post (the directory name) in the first level (the `1:' list) into `sorting.yml' and include the `{% doctoc_sort custom %}' tag in your layout file.
+ [2014-02-11T23:00:50Z] nounch This would basically move your sorting needs to one single file: `sorting.yml'. So you do not even need a consistent naming scheme and when you decide to use a different sorting order you do not have to rename any files, but simply change the lines in `sorting.yml'.
+ [2014-02-11T22:59:11Z] nounch SylvieLorxu: If you want a sorted list your posts you can simply use the `doctoc' tag since you only have one level in your hierarchy.
+ [2014-02-11T22:57:08Z] nounch SylvieLorxu: Read more about it here http://nounch.github.io/doctoc-documentation/doc/Documentation/Tags/Sort_Tag/.
+ [2014-02-11T22:56:57Z] nounch SylvieLorxu: SylvieLorxu DocToc lets you specify your sorting order (lexical, string length or custom). So you could put each post in its own directory which is located in one common dir in the project root, then specify your custom sort order in `sorting.yml'. To point to the next/previous post you can just use the `doctoc_prev'/`doctoc_next' tags.