Ask for advice/discussion: Documentation for Hugo websites on Codeberg Pages #2370
Labels
No labels
accessibility
bug
bug
infrastructure
Codeberg
contributions welcome
docs
duplicate
enhancement
infrastructure
legal
licence / ToS
please chill
we are volunteers
public relations
question
question
user support
s/Forgejo
s/Forgejo/migration
s/Pages
s/Weblate
s/Woodpecker
security
service
upstream
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Codeberg/Community#2370
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Comment
Question: Is there a setup we would recommend for hosting a Hugo based website on Codeberg pages?
BACKGROUND
I aim to transition my Hugo based website (https://gohugo.io) from a
GitHub (repo) + AWS Amplify (website build + hosting)setupto
Codeberg (Repo) + Codeberg Pages (hosting).I am happy to summarize all my learnings in a documentation for everyone. Therefore, I would like to take a "good" approach.
ISSUE DESCRIPTION
For the setup described above, I am struggling with the right Git setup (and I am not a git expert at all).
This is how I see it:
publicfolder would be added to the.gitignore.publicfolder to the dedicated pages repository in Codeberg.In this setup, the issue arises by having the
publicfolder in the.gitignore. From what I understand, there are multiple options to work around that. E.g. I could create a dedicated git repository in the public folder. Is this what we would recommend?I suggest you checkout the documentation about the new /git-pages server. In particular, the documentation of the Forgejo action might be useful if you decide to build the website using Codeberg’s CI.
You might have
Alternatively, if you don’t want to put stress on the CI and build your website locally, you can use the git-pages CLI tool to upload to user.codeberg.page from your local computer.
PS: Checking your repositories, /steiger/pegel-konstanz_website and /steiger/davidbeckonline-site, I realized that a free and open source licence is missing, which is a condition according to Codeberg’s Terms of Use.
Thank you very much for your feedback and all the suggestions, @mahlzahn . Very helpful.
I will take me some time to check all the content, but I will get back to you.
Hey @mahlzahn .
Thank you again for your feedback and suggestions.
If my understanding is correct, then I tend to think that I might return to the original idea of two distinct git repositories ("Code" excluding public and "pages" containing only the public content).
@steiger wrote in #2370 (comment):
Codeberg hosts some runners for lightweight jobs, too! See https://codeberg.org/actions/meta/
Yesterday, Codeberg's documentation was updated to include instructions how to use the new git-pages server, see https://codeberg.page/ and https://docs.codeberg.org/codeberg-pages/. In particular, https://docs.codeberg.org/codeberg-pages/forgejo-actions/.
Let me know if this works for you, else you also can use the legacy version with
pagesrepository.Thank you very much, @mahlzahn .
As a quick update for today: I was able to use the "Set up your website (new method with CI)" and create
The YAML file for the forgejo action looks as follows:
From what I understand, custom domains are not yet supported.
My next step is to create a simple example repo for a Hugo website and document this in a separate repository. If there should be any issues with the existing documentation, I will highlight this.