diff options
author | David Runge <dave@sleepmap.de> | 2019-04-21 00:12:06 +0200 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2019-04-21 00:12:06 +0200 |
commit | 6849a33d09efe9a3665813c4df404ee674697be3 (patch) | |
tree | f597d5ac49646b142e42350fc1717bd7ce3678a1 | |
parent | 59e03bc971f13b7995cc55b91e60f1f3fc82383d (diff) | |
download | sleepmap-6849a33d09efe9a3665813c4df404ee674697be3.tar.gz sleepmap-6849a33d09efe9a3665813c4df404ee674697be3.tar.bz2 sleepmap-6849a33d09efe9a3665813c4df404ee674697be3.tar.xz sleepmap-6849a33d09efe9a3665813c4df404ee674697be3.zip |
README.rst: Rewrite with nikola examples.
-rw-r--r-- | README.rst | 77 |
1 files changed, 48 insertions, 29 deletions
@@ -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 - <a href="https://getpelican.com" target="_blank">Pelican</a> +.. |nikola| raw:: html -.. |pelican-plugins| raw:: html + <a href="https://getnikola.com/" target="_blank">Nikola</a> - <a href="https://github.com/getpelican/pelican-plugins/" target="_blank">Pelican Plugins</a> +.. |handbook| raw:: html + <a href="https://getnikola.com/handbook.html" target="_blank">handbook</a> |