konklone / oversight.garden

Bringing together the oversight community's work.
https://oversight.garden
Creative Commons Zero v1.0 Universal
26 stars 9 forks source link

Basic blogging engine, see README.md #109

Closed audiodude closed 8 years ago

audiodude commented 8 years ago

From the README included with this CL:

There is a blogging system, powered by the Wintersmith static site generator, built into the site itself. By default, it can be easily used to create static pages ("blog posts") under oversight.garden/blog/. Here are the steps:

  1. Install the wintersmith CLI tool globally: npm install -g wintersmith
  2. Make sure wintersmith-ejs is installed in node_modules. It should be part of package.json
  3. Create a blog post markdown file in ./blog/ Something like ./blog/my-first-post.md. Make sure it has YAML front matter (you can look at existing posts for how to set this up). The filename key in the frontmatter can be used to specify a final URL for the post that is different from its file name (eg "filename: superblog.html" will make my-first-post.md be served as oversight.garden/blog/superblog.html).
  4. Run the wintersmith generator with this command: $ wintersmith build --config=blog-config.js
  5. Commit the new file(s) in ./public/blog to git/github.
  6. Deploy the site as normal
audiodude commented 8 years ago

Fixes #70

divergentdave commented 8 years ago

Could we .gitignore public/blog? I'd rather we add wintersmith to package.json too, invoke node_modules/.bin/wintersmith from the Fabfile deploy tasks, and keep the generated files out of git. In particular, updating the header or footer would create a lot of noise.

audiodude commented 8 years ago

That makes a lot of sense. Is there a way I can test the fabfiles?

divergentdave commented 8 years ago

I've done so by having fabric SSH into localhost previously. It can take some fiddling to get the configuration right.

konklone commented 8 years ago

@audiodude This is great work, and thank you for figuring out all the little things to integrate this properly into the repo.

I added some author metadata, styling, and made use of the title, and here's what it looks like now:

image

Which works for me for a starting point.

I also removed and gitignored the generated files from the repo, added a rake task that runs the wintersmith CLI tool, and a fab blog fabric task that regenerates the blog on the remote server. Integrating that into the auto-deploy process can be done later.

konklone commented 8 years ago

Thanks for doing this, @audiodude! This gives us a reasonable place to put a launch post, which we can use to promote the site, and use for our /about link (right now it redirects to an outdated Sunlight post).

audiodude commented 8 years ago

My pleasure!