Please note that the MIT license does not apply to all the files shared in this repository. See LICENSE.md and LICENSE-images.md for details.
- Make a copy of a page which is found in the content folder under a language. These are markdown files
.md
- Change the yaml header to suit your new page:
- The menu key will add a link in the top menu of the banner; its weight governs the ordering of the links
- Create the content in your new page
- Ensure there's a version of the page for each language in the content folder
Every image that is used for a blog entry has the size 800px*500px. Every picture for people is 500px*500px.
What information / content you need:
- name of expert
- image (500px x 500px)
- 2-3 words about the areas of their expertise (used for the subheader, see here)
- 2-3 description of the expert, in English and German
- optional but recommended, any of the following: GitHub profile link, Linkedin profile link, personal website
If you do not have write access to the website repository or you don't want to clone the repo and setup hugo, you can add (yourself as) an expert via the GitHub graphical interface:
- Make sure you're logged into GitHub and that you have all the content ready.
- open this link. It should open an editor in your browser.
- Scroll to the end of the file and copy-paste the last block. Make sure to add a comma before it (invalid JSON will be underlined in red).
- Edit the key (
firstname_lastname
, e.g.alex_musterperson
) and the content of your new block as needed. Available keys for social links arewebsite
,github
,linkedin
(check the other experts for examples). - In the sidebar, navigate to
static/images/people
. Right-click onpeople
and click on "upload". Upload your square image. It needs to be named like theimage
element inexperts.json
from step 3. Pay attention to the file extension, lower-/uppercase and the separator (_
or-
). - Navigate to
content/en/nonprofits/experts.md
. Copy-paste any of the blocks and edit thekey
element tofirstname_lastname
. It needs to match the key from step 3. - Repeat for
content/de/nonprofits/experts.md
. - In the sidebar, go to the Git tab. You should be able to commit your changes there. It might create a fork if you do not have write rights to the repository.
- Go to https://github.com/correlaid/hugo-website/pulls and open your Pull Request (there should be a yellow sign)
- Ping Frie via Slack to let them know about your PR, sending them the link to it.
If you have any problems with the process, ask Frie.
If you do not have write access to the website repository or you don't want to clone the repo and setup hugo, you can create an event via the GitHub graphical interface:
- open this link. Copy the content to your clipboard (ctrl/cmd + c).
- Open this link. Edit the file name so that:
- the month of the event is the folder, e.g. add
2022-09/
. GitHub will autocomplete that to a new folder. - the file name has no spaces in it, e.g.
open-onboarding-call.md
. The file name, will be the URL of the event, so choose carefully :) - the file name ends in
.md
, indicating markdown format
- Copy the content from 1. in the editor and edit away. Especially pay attention to the fiels in the YAML header at the beginning of the document, following the instructions in the comments (comments start with
#
). - Once you have finished your edits, ...
- if you don't have write access to the repository: click on "Propose new file" to make a Pull Request from your fork. On the next page, click "Create Pull Request". Create a meaningful name for the Pull Request and a small (one-sentence) description.
- if you have write access: select "create new branch and start a new Pull Request" and then click on "Propose new file" to make a branch and PR directly in the CorrelAid repository. On the next page, click "Create Pull Request", give it a meaningful title and short description.
- Repeat the process to add the event for the English page, replacing the link from step 2 with this link.
A template for event pages exists (a so called archetype file). To use it, please proceed as follows:
- in your terminal:
hugo new events/2022-09/my-event-name.md
This will create a markdown file with the given name under content/de/events
(because "de" is our default language).
- Edit the file as needed, especially the YAML header - you'll find instructions in the comments.
- Copy the file to the appropriate location under
content/en/events
to also add the event to the English version of our website.
detailed instructions coming soon. Pointer for now: edit data/people.json
and refer to this on how to include it in Markdown content.
- Licensing information
- Installation
- Development
- Deployment
- Add Content
You can find detailed installation instructions on the official hugo website. Below you find the basic configurations to quickly install hugo on your local system. If you encounter any problems or require a special configuration visit the official website.
Congratulations! You are on the most complicated system for using hugo 🎉.
- Download the latest zipped Hugo Extended executable from Hugo Releases. The current version for 64-bit is called
hugo_extended_0.49_Windows-64bit.zip
. - Extract all contents to your
..\Hugo\bin
folder. - The hugo executable will be named as hugo_hugo-version_platform_arch.exe. Rename the executable to hugo.exe for ease of use.
- In PowerShell or your preferred CLI, add the hugo.exe executable to your PATH by navigating to C:\Hugo\bin (or the location of your hugo.exe file) and use the command set
PATH=%PATH%;C:\Hugo\bin
. - Reboot your system.
- Open the PowerShell or your preferred CLI and enter
hugo version
to verify your installation.
Use brew
to install hugo
on your local system. Run hugo version
to verify your installation.
brew install hugo
Use apt
to install hugo
on your local system. Run hugo version
to verify your installation.
sudo apt-get install hugo
git clone https://github.com/CorrelAid/hugo-website.git
Hugo provides a development server that enables hot-reload. The folder is watched by hugo and as soon as you change a file the website is automatically reloaded.
- Open your favorite CLI and direct to the folder of your web application.
- Use
hugo server -D
to start the development server. The-D
flag is important to indicate that drafts are also shown. - Use CTRL + C to shutdown the server.
- Commit your changes to GitHub. If you're not an admin, you cannot push to the
main
branch, so please create a branch for your changes and then open a pull request. - Pull requests to the
main
branched are built into a deploy preview by Netlify. You will see this in the PR status checks. If you click on "Details" for the last status check (it should say something like "Deploy preview ready!"), you'll be taken to the deploy preview. - After someone has reviewed your changes and approved them, they'll be merged to
main
and automatically deployed to our FTP server by GitHub Actions. You can check the status of this deployment by looking at the "Actions" tab of the GitHub Repository. This will only happend if you have modified files that are actually relevant to the website, i.e. updating the README will not trigger a build.