This contains helpful information related to the en.ergie.at page.
Overview:
- Guide explains how to write and format content, and what common conventions we stick to.
- Contributing explains how to set up this project to contribute changes.
Dies ist ein wichtiges <mark>Thema</mark>.
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
These are not supposed to be used for topics that are better cross-referenced, e.g., DA market
(for day-ahead market) can be used, but should then be used as link [DA market](/wissen/...)
.
H<sub>2</sub>O
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
Make sure to use these accordingly. "CO2", "MWh_el", etc., are examples for their application.
Include
{{< katex >}}
in the document to render math stuff. \\( ... \\)
for inline, $$ ... $$
for block style.
Install markdownlint
to ensure proper markdown formatting in VSCode:
- Open the Extensions menu (last symbol in the left-side menu bar)
- Search for
markdownlint
and click install
Once installed, markdownlint
will automatically check your files as you type, highlighting formatting issues such as missing blank lines or inconsistent headers. By opening the "PROBLEMS" tab in the terminal section, you can view a list of all formatting issues and click on any item to jump directly to the corresponding line in your file.
- The main language for now is Deutsch (German) --- "DE".
- Make use of footnotes.
- Cite stuff that can be cited, link to stuff that can be linked to.
- Use
<mark>
to highlight stuff, instead of over-using bold/italic text. - The "readmore" tag
<!--more-->
can be used. - Use ## (heading level 2) as the first allowed heading level, avoiding the use of # (heading level 1) altogether. This ensures consistency and aligns with the page's rendering style, as the title of the page is already rendered prominently on the website.
Please stick to these topics to prevent duplicated entries (e.g., we use "markets" and not "market")
markets
The following series currently exist:
Strommärkte
Assuming a new author named Jane Doe
:
- Create
data/authors/jdoe.json
, with the content{"name": "Jane Doe"}
. - Create a short-bio including social links at
content/authors/jdoe/_index.md
.
Template for the bio:
---
title: "Jane Doe"
---
[{{< icon "github" >}} j11doe](https://github.com/j11doe)  · [{{< icon "linkedin" >}} jane-doe-17](https://at.linkedin.com/in/jane-doe-17)
_Jane's Kurzbiografie hier (Achtung: der Name kommt weiter unten noch einmal vor! Beispiele finden sich hier: https://en.ergie.at/authors/)_
Jane hat an den folgenden Inhalten mitgearbeitet:
See this author page for further ideas.
A fork is a personal copy of someone else's repository that lives under your GitHub account. It allows you to freely experiment with changes without affecting the original project, and you can propose updates back to the original repository through pull requests.
- Open the repository's entry page in your browser
https://github.com/ait-energy/en.ergie.at.git
and fork the repository. Make sure the following steps are then done in your fork (your "own version of this repository"). - Click on "Code" → copy the provided URL
- Open a new terminal in VSCode
- Navigate to your development folder using:
cd path/to/dev_folder
- Clone the repository by entering:
git clone URL
(paste the repository's URL) - Inside the folder
en.ergie.at
, executegit submodule update --init --recursive
to also get the (submodule-d) theme (this might take a bit)
Inside the folder
en.ergie.at
, executegit submodule update --remote --merge
to update the theme, whenever it changes upstream.
Hugo is a fast and user-friendly tool for building websites by converting plain text into web pages.
The following assumes you are using Windows; if you are not, head over to the install guide for your OS and pick whatever suits you.
- Pick the "prebuilt binaries" from this link: Prebuilt binaries -- instead of the general one
- Either follow the instructions in the link given in (1.), or extract the
hugo.exe
file and copy it into your development folder (which immediately works and does not involve modifying your PATH, etc.)
Hugo can be used to launch a local webserver that displays the current state of en.ergie.at
, including all draft (= non-published) pages that are present. This automatically rebuilds the page everytime you modify some file and save it, so that you can instantly observe how your changes would look like.
This can be done by:
- Open a new terminal in VSCode
- Inside the folder
en.ergie.at
, execute./hugo server --buildDrafts
to start the local server - A link will be displayed in the terminal, open it to view the local website
This section showcases a common workflow, used when proposing a change, on the example of adding (yourself) as new author - which might very likely be the first change that you'll do.
Note that the following steps can (and often should) already been done while working on a change. You can, e.g., already create a pull request while still working on some content. Just mark it as draft when creating it. This helps discussing and iterating on new content.
- In VSCode click on "main" (located in the bottom-left corner)
- Select "create new branch"
- Give the branch a meaningful name in lowercase with hyphens (e.g., add-new-author)
- Your active branch will now display as "add-new-author" instead of "main", indicating which branch you’re working on
- In the Explorer section, navigate to the
data/authors
directory - Right-click and select "New File" to create
data/authors/jdoe.json
, with the content{"name": "Jane Doe"}
- Navigate to the
content/authors
directory. - Create a new folder with the author's abbreviation and create an
index.md
file inside the foldercontent/authors/jdoe/_index.md
- Write the content you want to display (e.g., author bio, description), see Templates
- Once you are done making changes, make a commit
- Click on the 3rd icon in the left-hand sidebar ("Source Control")
- At the bottom, check that you're still on the correct branch (e.g.,
add-new-author
) - At the top, you should see the files you’ve modified, click the plus icon ("stage changes") next to each file to stage it for commit
- Add a commit message in the input field. For example,
authors: add jdoe
(see Style of commit messages for guidelines), then click "commit" - Click the three dots above the commit button in the top-right corner, select "push" to push the change
- After pushing, the new branch should appear on GitHub, click on "Compare & pull request"
- Enter a title for the pull request, e.g., “Add a new author” (this is for internal use, to help reviewers understand the change)
- To ensure that the person who should approve the PR is notified, tag them in the comment below using @abbreviation_of_the_person
- If this PR resolves an issue, write "fixes #1" in the comment (replace 1 with the issue number)
- Click on "create pull request"
- The pull request will appear in red until it has been reviewed (you may be asked to make changes)
- Once your PR is approved, the changes will be merged into the main branch
- Delete the old feature branch after the merge
- Switch back to your
main
branch in VSCode and update it by clicking on the icon next to the branch name in the bottom-left corner
Read up on conventionalcommits.org, and stick to the following:
chore
: for any general "chores" around the repository, including changes to the CI (do not tag that asci: ...
)hugo
: any changes to the Hugo configuration, theme configuration, or the theme itself- otherwise tag the main "thing" that you are modifying improving (instead of the usual
fix
,feat
, etc.)
Regarding the last point, some examples:
- Modifying something in an author's page:
authors: update XY bio
- Adding some page to the section
wissen
:wissen: add balancing energy market page
- Fixing something in the section
daten
:daten(fix): update interval of ABC
As you see the "tags" are always aligned with the folder names, "authors", "wissen", etc. Minor changes to language can
be done as wissen(fix): language
, pure typos as daten(fix): type
.
This also relates to "pure files", like the Impressum --- tag this with impressum: add note on X
.
If you want your changes to be included in the live version of this page (most likely), then tag a new release --- or if
you do not have the proper rights for that let someone tag it for you --- after your PR has been reviewed and merged
into main
. Based on CalVer we use the following versioning tags:
vYYYY.0M.MICRO
This means, for the first release tagged in December 2024, the tag looks like this: v2024.12.0
. The next would then be
v2024.12.1
, and so on. As soon as a release happens in the next month (here January 2025), it changes to v2025.01.0
.