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

Add support for TOML config files #1765

Merged
merged 5 commits into from Dec 5, 2013

Conversation

Projects
None yet
6 participants
@parkr
Member

parkr commented Nov 29, 2013

As much as I like YAML, TOML is where it's at. I'm sure @mojombo would agree. TOML is fully-featured and still very readable.

We'd need a Ruby parser. Based on TOML's README under "Implementations", we have the following four options:

My proposal is to add in support for TOML alongside YAML files, i.e. this is valid:

$ jekyll build --config _config.yml,overrides.toml

TOML and YAML would thus both be supported by Jekyll.

Thoughts?

@gregkare

This comment has been minimized.

Contributor

gregkare commented Nov 28, 2013

This is a good idea, I like it. So far I've only tried jm's toml, because it supports the same API as YAML, so you just need to change the class name in your code to switch to TOML.

I've done an experiment (quick and dirty, this is a spike branch) last month with supporting both TOML and YAML. I ended up with code like this:

Selector
TOML
YAML

I'm just using the extension, I haven't looked if some mime-type Ruby libraries can detect TOML.

Edit: Of course it's easy enough to write a wrapper to get any toml gem to use the same API as YAML :)

@parkr

This comment has been minimized.

Member

parkr commented Nov 28, 2013

Yeah, I use @jm's as well, though I figured we wouldn't discount the others.

@parkr parkr referenced this pull request Nov 29, 2013

Closed

Further support? #25

@troyswanson

This comment has been minimized.

Member

troyswanson commented Nov 29, 2013

Ref #971

@parkr

This comment has been minimized.

Member

parkr commented Nov 30, 2013

@mattr- I think this is ready to go. Lemme know.

@mattr-

This comment has been minimized.

Member

mattr- commented Dec 5, 2013

LGTM!

mattr- added a commit that referenced this pull request Dec 5, 2013

Merge pull request #1765 from mojombo/tomlify
Add support for TOML config files

@mattr- mattr- merged commit 052a577 into master Dec 5, 2013

mattr- added a commit that referenced this pull request Dec 5, 2013

@maul-esel

This comment has been minimized.

Contributor

maul-esel commented Dec 5, 2013

@mattr-

This comment has been minimized.

Member

mattr- commented Dec 5, 2013

Urgh. So it does. Now to figure out why and to dig up an old version of 1.8.7 😺

@parkr

This comment has been minimized.

Member

parkr commented Dec 5, 2013

@maul-esel I can't quite narrow down why that happens. Do you have a minute to take a look?

@parkr parkr deleted the tomlify branch Dec 5, 2013

@maul-esel

This comment has been minimized.

Contributor

maul-esel commented Dec 5, 2013

It seems the TOML parser reads the config file totally wrong, though I have no idea why.
It outputs the following:

baseurl: "47121111117459810197117116105102117108459810811110345121111117"
title: "77121321099710311010510210599101110116321151051161014432119117116"

which of course doesn't match the expected output. Is that some weird encoding error? But then why does it recognize the keys? Maybe @jm can help here?

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.