How to create a new article?

To write a new article, create a new Markdown file next to the existing files in the section that you want to put your article in. So, if for example you want to create an article called "Keeping your repo clean with .gitignore" in the "Working with Git Repositories" section, put a new file called for example gitignore.md into the content/git directory. Please adhere to the file naming conventions.

Then, add the eleventyNavigation header to your newly created file. That header contains information about the article's place in the structure of the site.

It can look like this:

---
eleventyNavigation:
key: WhatIsCodeberg
title: What is Codeberg?
parent: GettingStarted
order: 10
---

## Foo
Hello foo!

## Bar
Hello bar!

Every section and article has a unique key. If parent is set to the key of another section, the current article will become a child of that other section.

The other fields are title and order, where

  • title is merely a display name and determines the menu entry label as well as the article's heading but has no other "technical" semantics and
  • order is a number that can be used to enforce a specific order of articles (which is good for step-by-step guides such as Getting Started for example).

So to create a new article, find the key of your desired parent section in its Markdown source code and use it as the parent for your new article.

After the header is in place, you can now start writing your article in Markdown. It is recommended to add a blank line after the header's trailing three dashes.

Please do not repeat the article's title as a first-level heading in Markdown. It will added automatically when generating the final site.


Hey there! 👋 Thank you for reading this article!

Is there something missing or do you have an idea on how to improve the documentation? Do you want to write your own article?

You're invited to contribute to the Codeberg Documentation at its source code repository, for example by Adding a pull request or joining in on the discussion in the issue tracker.

For an introduction on contributing to Codeberg Documentation, please have a look at the Contributor FAQ.

© Codeberg Docs Contributors. See LICENSE