Is there a configuration to change the _posts directory, to something like _posts_pt-br? #639

Closed
fcy opened this Issue Sep 8, 2012 · 3 comments

Comments

Projects
None yet
5 participants

fcy commented Sep 8, 2012

Hello,

I want to write posts in two languages but I don't want them to be intertwined in the same home page. So my idea is to separate the posts in different directories:

_posts (contains the posts in english)
_posts_pt-br (contains the posts in portuguese)

To do this I would need to pass which posts directory jekyll needs to look:

jekyll . public/br --posts-dir _posts_pt-br

So the portuguese posts are created in public/br.

All the configurations, layout and styles would remain the same just the content would change. Also the ability to pass the configuration file would fit perfectly in this scenario see #561.

patcon commented Sep 19, 2012

Another use-case for this -- would love to insist all PRs on a project also include appropriate changes to the documentation site. Currently, GitHub Pages operate using a separate branch, so it's not doable to audit this easily.

However...

If we could choose a new directory for _posts/, we could add a submodule into the root of the gh-pages branch, which pointed to master branch of the self-same repo, and point to that with something like posts_dir: ./PROJECT/docs in _config.yml. So the structure would be like this (please excuse it for not being a true jekyll site):

gh-pages branch root
├── _config.yml
├── index.html
├── javascripts
│   └── scale.fix.js
├── params.json
├── PROJECT <= submodule pointing to master branch
│   ├── CHANGELOG.md
│   ├── Cheffile
│   ├── Cheffile.lock
│   ├── Gemfile
│   ├── Gemfile.lock
│   ├── // etc...
│   ├── docs
│       ├── 2010-11-12-set-multiple-sidebars-wordpress.markdown
│       └── 2010-11-14-24theweb-completes-3-websites.markdown
└── stylesheets
    ├── pygment_trac.css
    └── styles.css

Is this not a good use-case for this functionality? This would allow users to encourage project PRs to include updates that will keep the official site from getting out of date with the code. It's a solution that builds on our established github workflow of auditable PRs :) Docs are updated in the same PR's, and updating the site is as simple as pointing the submodule to a more recent commit hash.

I know the composer project does something similar, and I'm sure @Seldaek can testify to it greatly improving their documentation process (they're not using jekyll, but a php analog)

//cc @mojombo @jakeboxer @jsncostello

PS, Allowing us to change to source param would also solve this (it's now overriden by GitHub).
https://help.github.com/articles/using-jekyll-with-pages

patcon commented Sep 19, 2012

This is what I was going for, for the record:
https://github.com/myplanetdigital/ariadne/tree/gh-pages

But GitHub Pages doesn't allow it:
http://myplanetdigital.github.com/ariadne/

Thanks for reading y'all

@patcon patcon referenced this issue in myplanetdigital/vagrant-ariadne Sep 19, 2012

Closed

Create Ariadne project website using GitHub Pages #27

What about static pages, like index.html, if you have one? This change is probably not a bad idea in general, but I'm not sure that it totally solves your problem.

@parkr parkr closed this Mar 19, 2013

@jekyllbot jekyllbot 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.