diff --git a/README.md b/README.md index f0931e1..e11b8ff 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,75 @@ How to build the web site ========================= -You need hugo to build the website. On Debian, install it from the -'hugo' package: +Initial Setup +------------- - # apt install hugo +You need git and hugo to build the website. On Debian or similar +Linux Distributions, install them like this: + + $ sudo apt install git hugo + +Now you can clone the repository: + + $ ssh://git@gitlab.hamburg.ccc.de:4242/cryptoparty/website-content.git + +If this doesn't work, you may need to add a ssh authentication key to +your gitlab profile on [this page]: + +[this page]: https://gitlab.hamburg.ccc.de/profile/keys Furthermore, you need to checkout the submodules: + $ cd website-content website-content $ git submodule init website-content $ git submodule update -Now you can build the site using 'make', it will be put into 'public'. -'make server' will launch a local server that is useful while editing -the web site. +Building and making changes +--------------------------- -Server setup ------------- +Now you can build the site using `make`, it will be put into `public`. +`make server` will launch a local server that is useful while editing +the web site. To view the site while you are editing it, go to +[http://localhost:1313](http://localhost:1313). + +Creating a new post +------------------- + +First, make sure your checkout is up-to-date: + + $ git pull + +Then, create a new branch for you post: + + $ git checkout -b my-new-post + +Now, to create a new post for a meetup, do: + + $ hugo new termine/2020-januar.md + $ editor content/termine/2020-januar.md + +Fill out the scaffolded header on top. Add content below the `---` +marker. After the first paragraph, insert `` to mark the +first paragraph as the introduction to be used on the front page. Use +`make server` to view your changes. + +If you are satisfied, add it to the branch, and push it to the server: + + $ git add content/termine/2020-januar.md + $ git commit -m 'Added new post.' + $ git push + +Then, [create a merge request] on gitlab. Press the blue button +labeled `Create merge request`. On the following site, press the +green `Submit merge request` button, then press the blue button +labeled `Merge once pipeline succeeds`. Your change will be published +once the continuous integration setup confirmed the validity of the +change. + +[create a merge request]: https://gitlab.hamburg.ccc.de/cryptoparty/website-content/merge_requests + +How this is set up on the server +================================ On the server, the website is built using gitlab's ci runner, see `.gitlab-ci.yml`. To deploy the site, the ci job rsyncs it to the