opensourcecities / montreal

A directory of companies, people, and projects that are Open Source and from Montréal.
https://opensourcecities.github.io/montreal/
The Unlicense
98 stars 31 forks source link

Add a Rakefile for automatically templating out additions #36

Closed RichardLitt closed 6 years ago

RichardLitt commented 6 years ago

Something like this would be great:

$ rake project title="Montreal" github="@opensourcecities" description="A website"

Instead of having to manually copy templates.

khos2ow commented 6 years ago

What kind of templates?

RichardLitt commented 6 years ago

The samples: https://github.com/opensourcecities/montreal/blob/master/data/sample-other.yml

khos2ow commented 6 years ago

That can be done directly with hugo command. Something like hugo new user (don't remember the syntax by heart now, but in this ball park)

I didn't add it anywhere in the doc because contributors need to have hugo installed, rather than copy/paste the file.

RichardLitt commented 6 years ago

Good points. Shell or rake (I think?) would mean that users wouldn't need to have Hugo installed; it's what I normally use with Jekyll sites.

khos2ow commented 6 years ago

I like this idea! I would say we should support all three to attract as many people as possible without enforcing them to install something in order to contribute: 1) Hugo (natively) 2) Rake (intermediate) 3) Bash (zero-dependency).

RichardLitt commented 6 years ago

Let's just set up a bash script, then. I think that's the easiest. :)

khos2ow commented 6 years ago

Great, I'll do something this week and most probably update contribution guide with Hugo and bash for now to see what other we can do for rake or something totally different.

RichardLitt commented 6 years ago

Sweet. Thanks @khos2ow! I'm trying to finish up some other priorities and don't have a ton of time available to help at the moment, so I appreciate the effort. :)

khos2ow commented 6 years ago

No worries. I know, me neither, so don't take me up on that just yet :wink:

khos2ow commented 6 years ago

I added hugo binary to the repo and the topic on this issue isn't required anymore. The only way user can add content is ./binaries/hugo new <type>/<filename>.md, in which type can be: