diff options
-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> |