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

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

Another possible way to let Github Pages use the result of the custom converter. #23

Closed ocha- closed 10 years ago

ocha- commented 11 years ago

This is another possible way. Also this time, I recommend to check the commits one by one, especially the second one is a little heavy.

By removing this kind of header of each textile,


---
layout: default

---

jekyll won't compile and serve the textile files directly, instead the generated htmls are used.

The necessary procedures to update the site will be

$ ./script/generate_htmls
$ git add *.html
$ git commit -m "update the site"

Sadly, the working directory would look like this https://github.com/ruby-hacking-guide/ruby-hacking-guide.github.com/tree/06ea5f5974ae109e8f23904e88c2a79ad97b6773

Since this structure could be inconvenient for translators and reviewers, I think there's no need to hurry to apply this to master.

I just think I want a way to let Github Pages use the result of the custom converter without changing the location of each textile file.

markburns commented 11 years ago

I'm not a fan of this, is there a way we can at least keep the generated files in a subfolder?

Just an idea, but how would you feel about moving the whole thing to use GitHub markdown instead?

hamiltop commented 11 years ago

I think the labor pool is large enough that we could move to GitHub markdown pretty quickly. There are a lot of people (I'm one of them) willing to help who can't do much with the translation.

hamiltop commented 11 years ago

Alternatively, we could put the html at the top level, and the textile under a subdir (/src or something)

markburns commented 11 years ago

See #24 Re markdown conversion. Issue is that collaborators don't show up after a rename. Which isn't really fair considering the amount of effort put in by other collaborators.

ocha- commented 11 years ago

The way I tried at #22 is a way putting the generated files in ./htmls and let Github use it. But Github does not allow to overwrite :source option of jekyll, so I gave up it. I also think it's nice if Github Pages allow to use :source option.

Moving to Github Markdown is a nice idea, but there's also some advantages of using the custom convertor.

For example, if we decide to uniform the styles to MLA style, a simple code would suffice this purpose

content.gsub '".', '."' 

without creating a huge commit editing all over the files.

ocha- commented 11 years ago

If Github can preserve the contributors list for each file, moving textiles to /src or something is nice. I also don't like the result tree of this pull request.

ocha- commented 11 years ago

I basically like the way applying the least amount of changes for each existing file because it can keep our history simple and be easier to review.

The translators who joined after this repository was created often naturally use the textile style code markup. I guess it is because of the .textile extension, it was just .txt in the original repository.

@code@

And there's no problem to use this syntax in the current way because it can also be compiled.