From 6849a33d09efe9a3665813c4df404ee674697be3 Mon Sep 17 00:00:00 2001 From: David Runge Date: Sun, 21 Apr 2019 00:12:06 +0200 Subject: README.rst: Rewrite with nikola examples. --- README.rst | 77 +++++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 29 deletions(-) diff --git a/README.rst b/README.rst index 8b91263..1f1bb63 100644 --- a/README.rst +++ b/README.rst @@ -1,56 +1,75 @@ -Sleep Map -######### -| This is the README for http://sleepmap.de. -| -| The website is constructed from +======== +SleepMap +======== -* a |pelican| project (all content as reStructuredText, see *reStructuredText_CheatSheet.txt* for help). -* a subset of |pelican-plugins|, which are a submodule of this repository in the folder **pelican-plugins** -* a customized theme - have a look at the **theme** folder +This is the source code repository for https://sleepmap.de -Getting the content -------------------- +|nikola| is used to generate the static content from this source code +repository. Have a look at its |handbook| for more information. -* Clone the repository +Installing nikola +################# + +To install nikola, either use your distributions package manager: + + .. code:: bash + + # Arch Linux example + pacman -S nikola + + # Ubuntu/Debian example + apt-get install nikola + +Alternatively, you can install it via pip3: .. code:: bash - git clone git@sleepmap.de:sleepmap.git + pip3 install --user nikola -* Initialize all submodules +If installing through pip, make sure to add *~/.local/bin* to your **$PATH** +afterwards (if that's not already the case): .. code:: bash - git submodule update --init --recursive + # ~/.bash_profile + export PATH="${HOME}/.local/bin:${PATH}" -Generating new content ----------------------- -| After editing pages or blog posts, re-generate the whole site by doing a simple + +Working with the code base +########################## + +Build the website: .. code:: bash - pelican + nikola build + +To run the website locally: -| in the root directory of this repository. It will generate the whole website below the **output** folder. + .. code:: bash + + nikola serve -Upload new content ------------------- -| Uploading the new content now is as easy as doing a +To deploy the website to its webserver destination: .. code:: bash - make rsync_upload + nikola deploy -| in the root directory of this repository. -| This will automatically rsync the output folder with your remote website folder. +| You need to have a valid ssh key on the remote host machine. +| Please make sure to add the latest deploy and push it to the repository: + .. code:: bash + git add state_data.json + git commit -m "state_data.json: Deployed website." + git push -.. |pelican| raw:: html - Pelican +.. |nikola| raw:: html -.. |pelican-plugins| raw:: html + Nikola - Pelican Plugins +.. |handbook| raw:: html + handbook -- cgit v1.2.3-70-g09d2