Codeberg/Community
60
387
Fork
You've already forked Community
12

[enhancement] Have codeberg pages per repository #218

Closed
opened 2020年07月09日 18:42:54 +02:00 by kollo · 6 comments

The codeberg pages are fine for personal (home) pages. but If I just want a homepage for a software project, this does not fit well. Wouldnt it be nice to have pages in each repository? For example I have the (sourceforge hosted) home page of the the Project https://codeberg.org/kollo/X11Basic/ in its subfolder htdocs/ https://codeberg.org/kollo/X11Basic/src/branch/master/htdocs

Just as an example how that could work. The content of that folder could automatically render as http://pages.codeberg.org/myusername/X11Basic

Things to consider: how to treat forks of that repository? A fork should probably not automatically have its own clone of the homepage.

If this suggestion is too controversal, then having multiple repositories (instead of only one called "pages"), could at least allow for multiple project home pages. But I would like it pretty much to have the pages in the same repository together with the sources and all other stuff belonging to the project.

In this case, treat all repositories with a name pattern of xxx_pages as homepages to be redered in http://pages.codeberg.org/username/xxx/

The codeberg pages are fine for personal (home) pages. but If I just want a homepage for a software project, this does not fit well. Wouldnt it be nice to have pages in each repository? For example I have the (sourceforge hosted) home page of the the Project https://codeberg.org/kollo/X11Basic/ in its subfolder htdocs/ https://codeberg.org/kollo/X11Basic/src/branch/master/htdocs Just as an example how that could work. The content of that folder could automatically render as http://pages.codeberg.org/myusername/X11Basic Things to consider: how to treat forks of that repository? A fork should probably not automatically have its own clone of the homepage. If this suggestion is too controversal, then having multiple repositories (instead of only one called "pages"), could at least allow for multiple project home pages. But I would like it pretty much to have the pages in the same repository together with the sources and all other stuff belonging to the project. In this case, treat all repositories with a name pattern of xxx_pages as homepages to be redered in http://pages.codeberg.org/username/xxx/
Member
Copy link

You can do this by simply adding a subfolder in your pages repo:

<username>/pages.git/<project>/index.html
maps to:
https://pages.codeberg.org/<username>/<project>/index.html

Also, for larger projects, you probably want to have a dedicated org, whose pages repo (accessed by many users) will contain the pages of the org's project.

You can do this by simply adding a subfolder in your pages repo: ```text <username>/pages.git/<project>/index.html maps to: https://pages.codeberg.org/<username>/<project>/index.html ``` Also, for larger projects, you probably want to have a dedicated org, whose pages repo (accessed by many users) will contain the pages of the org's project.
Author
Copy link

Hm, I see. But trying to unpersonalize as much as possible, the pages belong to the software repository and not to the person who happen to own a fork of it.

Hm, I see. But trying to unpersonalize as much as possible, the pages belong to the software repository and not to the person who happen to own a fork of it.
Owner
Copy link

Hmm, I agree that the pages are for not optimal for all the use cases, but I like the way it is right now better than most of the approaches I know.

Having a pages repo for every user makes it possible to present yourself and your projects. Since most larger projects are also moved to their own organization, I think it's fine to open the pages branch there. I can see some benefits of @kollo's approach but I think they're not (yet) worth making complicated changes to the current implementation.

Personally, I also don't think that a project homepage belongs into the repository of the project itself, whether in a subfolder or an independent branch (like with gh-pages).

Hmm, I agree that the pages are for not optimal for all the use cases, but I like the way it is right now better than most of the approaches I know. Having a `pages` repo for every user makes it possible to present yourself and your projects. Since most larger projects are also moved to their own organization, I think it's fine to open the `pages` branch there. I can see some benefits of @kollo's approach but I think they're not (yet) worth making complicated changes to the current implementation. Personally, I also don't think that a project homepage belongs into the repository of the project itself, whether in a subfolder or an independent branch (like with gh-pages).
Member
Copy link

Hm, I see. But trying to unpersonalize as much as possible, the pages belong to the software repository and not to the person who happen to own a fork of it.

Adding a section to the pages renderer that first checks for URL https://pages.codeberg.org/<user>/<repo>/ in <user>/<repo.git>/.codeberg/pages before checking <user>/pages.git/<repo> should be doable. If anybody is interested in contributing, PR welcome!

Pleas have a look into https://codeberg.org/Codeberg/build-deploy-gitea/src/branch/master/var/www/pages for details.

> Hm, I see. But trying to unpersonalize as much as possible, the pages belong to the software repository and not to the person who happen to own a fork of it. Adding a section to the pages renderer that first checks for URL `https://pages.codeberg.org/<user>/<repo>/` in `<user>/<repo.git>/.codeberg/pages` before checking `<user>/pages.git/<repo>` should be doable. If anybody is interested in contributing, PR welcome! Pleas have a look into https://codeberg.org/Codeberg/build-deploy-gitea/src/branch/master/var/www/pages for details.
Author
Copy link

Mentioning the possibility to have a per-organization web page URL, this issue becomes less important (to me). One can create an organization with the same name as the repository (assuming it is named like the software), and put a single pages repository inside. So you would need to separate the WEB pages from the rest of your project, but at least you get an URL without the codeberg username (and instead with the project name).

If one still wants to have the pages together with the code, one could make use of a submodule in git (to automatically include the pages repository in the code repository under a folder (e.g. html/ or htdocs/)).

Works for me.

Mentioning the possibility to have a per-organization web page URL, this issue becomes less important (to me). One can create an organization with the same name as the repository (assuming it is named like the software), and put a single pages repository inside. So you would need to separate the WEB pages from the rest of your project, but at least you get an URL without the codeberg username (and instead with the project name). If one still wants to have the pages together with the code, one could make use of a submodule in git (to automatically include the pages repository in the code repository under a folder (e.g. html/ or htdocs/)). Works for me.
Owner
Copy link

We now support a pages branch, have a look at https://codeberg.page for more information.

We now support a `pages` branch, have a look at https://codeberg.page for more information.
Sign in to join this conversation.
No Branch/Tag specified
main
No results found.
Labels
Clear labels
accessibility
Reduces accessibility and is thus a "bug" for certain user groups on Codeberg.
bug
Something is not working the way it should. Does not concern outages.
bug
infrastructure
Errors evidently caused by infrastructure malfunctions or outages
Codeberg
This issue involves Codeberg's downstream modifications and settings and/or Codeberg's structures.
contributions welcome
Please join the discussion and consider contributing a PR!
docs
No bug, but an improvement to the docs or UI description will help
duplicate
This issue or pull request already exists
enhancement
New feature
infrastructure
Involves changes to the server setups, use `bug/infrastructure` for infrastructure-related user errors.
legal
An issue directly involving legal compliance
licence / ToS
involving questions about the ToS, especially licencing compliance
please chill
we are volunteers
Please consider editing your posts and remember that there is a human on the other side. We get that you are frustrated, but it's harder for us to help you this way.
public relations
Things related to Codeberg's external communication
question
More information is needed
question
user support
This issue contains a clearly stated problem. However, it is not clear whether we have to fix anything on Codeberg's end, but we're helping them fix it and/or find the cause.
s/Forgejo
Related to Forgejo. Please also check Forgejo's issue tracker.
s/Forgejo/migration
Migration related issues in Forgejo
s/Pages
Issues related to the Codeberg Pages feature
s/Weblate
Issue is related to the Weblate instance at https://translate.codeberg.org
s/Woodpecker
Woodpecker CI related issue
security
involves improvements to the sites security
service
Add a new service to the Codeberg ecosystem (instead of implementing into Forgejo)
upstream
An open issue or pull request to an upstream repository to fix this issue (partially or completely) exists (i.e. Forgejo, Weblate, etc.)
wontfix
Codeberg's current set of contributors are not planning to spend time on delegating this issue.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Codeberg/Community#218
Reference in a new issue
Codeberg/Community
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?