Editing Texts on Codeberg
Right now your texts live on your server, where only the AI can reach them comfortably. In this chapter they move to Codeberg, and from then on you can change a text from any browser, even from your phone, without logging in to the server and without asking the AI.
Goal
By the end of this chapter you will:
- have a Codeberg account and a repository for your site's content,
- have changed a text in the browser and seen it on the live site,
- know how to look at old versions and undo a change.
What Codeberg is
Codeberg is a place to keep files with their whole history. Every change is saved as a small step with a date and a note, and you can always look back or go back. It is run by Codeberg e.V., a non-profit association in Berlin, and it is free.
The storage unit on Codeberg is a repository ("repo"): one folder with all the files of a project and their history. Your site gets one: the content repo.
One thing to know before you start: ForgeCMS reads the content repo from the internet, so it must be public. That is no loss, because everything in it is on your public website anyway. Settings, passwords and anything private stay on the server, in app.sml (chapter 2).
Step 1: Create an account and a repository
- Go to codeberg.org and register. Confirm your email address.
- Click the + at the top right, then New repository.
- Name it after your site, for example
mybakery-site. Leave it public. Click Create repository.
The repository is empty for now. The AI will fill it.
Step 2: Let the AI move the texts
Your server needs permission to write into the repository. The safe way is an SSH key: a pair of keys, one secret on the server, one public that you give to Codeberg. Ask Claude Code on your server:
I created the empty repository https://codeberg.org/MYNAME/mybakery-site.
Please move the content of my site (pages, texts, site.sml, pictures) there,
so that ForgeCMS reads it from Codeberg. Create an SSH key for pushing if
needed and tell me where to add it on Codeberg. Keep app.sml and the theme
on the server.
Claude creates the key and shows you a line starting with ssh-ed25519. Copy it. On Codeberg, click your picture at the top right → Settings → SSH / GPG keys → Add key, paste it, give it a name like "my server", and save. Tell Claude it is done.
Claude then copies the files into the repository, pushes them, and changes the Site { } block in app.sml so that ForgeCMS reads from Codeberg. Afterwards it looks something like this:
Site {
host: "codeberg.org"
user: "MYNAME"
repo: "mybakery-site"
branch: "main"
layout: "site.sml"
}
Reload your website. It looks the same, but now it comes from Codeberg.
Step 3: Change a text in the browser
Open your repository on Codeberg. You see your files: index.sml, home.md, hours.md and so on. The .md files are your texts.
- Click on
hours.md. - Click the pencil icon (Edit file) at the top right of the file.
- Change the text, for example the opening hours.
- Scroll down. Under Commit changes, write a short note about what you changed, such as
New opening hours from November. - Click Commit changes.
Now reload the page on your website. The change usually appears within a few minutes. ForgeCMS asks Codeberg for every page whether something changed, but Codeberg itself keeps copies for a short while.
That's it. No login to the server, no admin area, no "publish" button. This works from a phone too: Codeberg's website works in a phone browser.
A little Markdown
Markdown is plain text with a few marks:
| You write | You get |
|---|---|
# Title |
a big heading |
## Section |
a smaller heading |
| an empty line | a new paragraph |
**bold** |
bold |
*italic* |
italic |
[our menu](/bread) |
a link |
- item |
a list |
 |
a picture |
Tables are written with | and a line of dashes:
| Bread | Price |
|---|---|
| Sourdough rye | €5.20 |
Keep it to these. Boxes, buttons and columns are layout; they belong in the .sml file of the page, and the AI is better at those.
Step 4: Look back, go back
Every commit is kept. To see the history of a file, open it on Codeberg and click History. Each line is one change: who, when, and the note. Click a change to see exactly which lines were changed: red is removed, green is added.
To undo a change, the easiest way is to ask:
Please undo my change to hours.md from this morning.
The AI restores the old version as a new commit, so nothing is lost, not even the mistake. You can also do it by hand: open the old version from the history, copy its text, and paste it into the editor as in step 3.
Pictures
Pictures go into the static folder of the repository, for example static/images/. On Codeberg, open the folder, click Add file → Upload file, choose the picture and commit. In a text you then show it with:

Keep pictures small: a photo of 1600 pixels width is plenty for a website. Phones take pictures of 4000 pixels and more, which makes pages slow. Most phones and computers can make a smaller copy; or ask the AI to make one.
Pitfalls
- The change does not show up: wait a few minutes and reload. If it still does not appear, look for a typo in an
.smlfile: a missing"or}makes ForgeCMS keep the last working version. Ask the AI: "My change to index.sml does not show up. Please find out why." - You edited the wrong language: the English texts are in the main folder, the German ones in
de/(chapter 6). - You put HTML into a text: it may work, but it mixes layout into your words. Ask for an SML element instead.
- You made the repository private: ForgeCMS cannot read it then, and the site shows errors. Make it public again under Settings of the repository.
What you learned
- Your content lives in a public repository on Codeberg; settings and secrets stay on the server.
- You change a text in the browser: pencil, edit, commit. The site follows within minutes.
- Every change is kept. History shows them, and the AI can undo any of them.
- Pictures go into
static/and appear in texts with.
Next: the menu, new pages, and a second language.
