Codeberg/pages-server
25
386
Fork
You've already forked pages-server
55

Serve from pages branch when available #39

Closed
opened 2021年12月15日 13:36:13 +01:00 by adnan360 · 0 comments

I'm interested in using static site generators like Hexo, Hugo etc. with Codeberg CI + Pages v2.

Right now if I create:

organization > pages repo > pages branch > index.html

It shows index.html from main branch (see #36 for reference), meaning:

organization > pages repo > main branch > index.html

I usually commit to main branch. So I'll have to keep source for the website with its output.

This has disadvantages like:

  • pollutes source with build outputs, which many don't like as discussed before
  • difficult to clean previous output; e.g. if I had a page, generated output, committed the output, then decided to delete the page, it will be difficult to deal with it esp. if I have lots of content and if the output is on repo root.

Workarounds I can think of:

  • Add a @pages at the end of URL: like https://hexo-test.codeberg.page/@pages/; while this may work, the URL is difficult to type and not good to look at
  • Set pages branch as default, commit to main: Suggested by @momar here. This may work, but working like this seems a bit odd. I've used GitLab Pages and I don't have go through all these to get it working.

Since workarounds are not actually perfect, I think pages-server should serve from pages branch if such a branch exists. It will help keep the source clean.

If you agree with this, give an upvote ( 👍 ) to this post.

I'm [interested](https://codeberg.org/Codeberg/Community/issues/498) in using static site generators like Hexo, Hugo etc. with Codeberg CI + Pages v2. Right now if I create: > organization > pages repo > pages branch > index.html It shows index.html from main branch (see #36 for reference), meaning: > organization > pages repo > main branch > index.html I usually commit to main branch. So I'll have to keep source for the website with its output. This has disadvantages like: - pollutes source with build outputs, which many don't like [as discussed before](https://codeberg.org/Codeberg/Community/issues/498#issuecomment-250296) - difficult to clean previous output; e.g. if I had a page, generated output, committed the output, then decided to delete the page, it will be difficult to deal with it esp. if I have lots of content and if the output is on repo root. Workarounds I can think of: - Add a `@pages` at the end of URL: like `https://hexo-test.codeberg.page/@pages/`; while this may work, the URL is difficult to type and not good to look at - Set pages branch as default, commit to main: Suggested by @momar [here](https://codeberg.org/Codeberg/pages-server/issues/36#issuecomment-289916). This may work, but working like this seems a bit odd. I've used GitLab Pages and I don't have go through all these to get it working. Since workarounds are not actually perfect, I think pages-server should serve from pages branch if such a branch exists. It will help keep the source clean. If you agree with this, give an upvote ( 👍 ) [to this post](https://codeberg.org/Codeberg/pages-server/issues/36#issuecomment-289916).
Sign in to join this conversation.
No Branch/Tag specified
main
no-not-allow-for-new-users
pages
pages-custom-domain-update
ci_user-local-acme-service
feat/redis-caching
fix/memory-problem
v6.4
v6.3
v6.2.1
v6.2
v6.1
v6.0
v5.1
v5.0
v4.6.3
v4.6.2
v4.6.1
v4.6
v4.5
v4.4
v4.3
v4.2
v4.1
v4.0
v3.2.1
v3.2
v0.3.1
v0.3.0
v0.2.2
v0.2.1
v3.1
v3.0a
v3.0
v2.5b
v2.5a
v2.5
v2.4
v2.3
v2.2
v2.1
v2.0
v1.0_php
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
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/pages-server#39
Reference in a new issue
Codeberg/pages-server
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?