ruby-hacking-guide / ruby-hacking-guide.github.com

Ruby Hacking Guide Translation
http://ruby-hacking-guide.github.io/
318 stars 52 forks source link

a possible way to let Github Pages use the result of the custom converter #22

Closed ocha- closed 11 years ago

ocha- commented 11 years ago

As written on the document of Jekyll, http://jekyllrb.com/docs/plugins/

Github Pages does not allow custom plugins to run, thus we need to convert the site locally and push the generated files.

This is a possible way to accomplish it without changing the current structure, but this requires some extra procedures.

We need to first generate the site to ./htmls by this command

$ jekyll build --config _config.htmls.yml

Then, push the generated site to update Github Pages.

$ git add htmls
$ git commit -m "push the generated site"

I actually not sure about Github Pages interprets the :source option of _config.yml, probably it does.

I reccomend to check the two commits one by one, especially the latter one is a little heavy to load. The first one is for new settings, the latter one is to commit the generated htmls.

Note that I didn't include html/images to these commits because it can be significantly heavy to review.

markburns commented 11 years ago

I'm not sure what problem this solves?

ocha- commented 11 years ago

This project has had some custom syntaxes to simplify the texts since more than 7 years ago. For example,

`code`

this syntax was introduced because the code syntax of Textile is limited.

@code@

Not only this syntax is less readable, we need spaces at both sides of the @ marks.

So, for instance, this case cannot be compiled properly.

@VALUE@s

When you open this page you'll find this syntax is not compiled, http://ruby-hacking-guide.github.io/name.html

but when you run the site locally and open this page, you'll find the result of the custom plugin. http://localhost:4000/name.html

markburns commented 11 years ago

I get you. So I guess you need to merge this in, just to try it out on GitHub pages? If so, I'd say merge it in, and experiment with it, pushing whatever needs pushing straight to master

ocha- commented 11 years ago

Yes, this is an experiment. I hope it works well.

ocha- commented 11 years ago

This experiment failed..

I found this document after I tried. https://help.github.com/articles/pages-don-t-build-unable-to-run-jekyll#source-setting