#218 [enhancement] Have codeberg pages per repository

Open
opened 1 month ago by kollo · 4 comments
kollo commented 1 month ago

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/
hw commented 1 month ago
Owner

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.
kollo commented 1 month ago
Poster

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.
fnetX commented 1 month ago

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).
hw commented 1 month ago
Owner

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.
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.