Skip to content

Latest commit

 

History

History
93 lines (66 loc) · 2.36 KB

File metadata and controls

93 lines (66 loc) · 2.36 KB

This area holds a Nikola source area for producing news.

Initial setup

Get the blog source

$ git clone git@github.com:wirecell/wire-cell-docs.git
$ cd wire-cell-docs

Get the blog software

To make new posts, rebuild the HTML and other things we need Nikola and its orgmode plugin. Installation is best done in a Python venv.

It is recommended to use direnv to manage the environment:

$ echo layout python3 > .envrc
$ direnv allow

But, one if that is not wanted, one can do things more manually:

$ python3 -m venv venv
$ source venv/bin/activate

Then install Nikola and its orgmode plugin:

$ pip install Nikola aiohttp watchdog jinja2

It should now be possible to serve the blog content locally:

$ cd news/
$ nikola auto

New post

To make a new post, first follow the above so that the nikola program is available and from the news/ directory and then run a command like:

$ nikola new_post \
         -f orgmode \
         -t "The News title" \
         -a "Your Name" \
         --tags=comma,separated,avoid,proliferation

Notes:

  • Can also answer prompts instead of giving exhaustive command line args.
  • Feel free to use another source format than orgmode.
  • Edit the resulting file to add content.
  • Use grep tags posts/* or check online list to find existing tags. Prefer reuse but also novel tags are okay.

While editing, it may be useful to run:

$ nikola auto

in order to view how the post will appear and gain auto-refreshing of the your browser.

Deployment

The news (and the manual) deploy into the wirecell.github.io git repo for serving by GitHub. To deploy the news be sure that this repository is cloned “next door” to wire-cell-doc as in:

$ git clone git@github.com:WireCell/wirecell.github.io
$ cd wire-cell-docs/news/
$ nikola build
$ cd ../../wirecell.github.io
$ git add ...  # as needed
$ git commit -am "Update news"
$ git push

Authoring

$ nikola auto

Now visit http://127.0.0.1:8000/.

See: https://plugins.getnikola.com/v7/orgmode/