Write once, insert when needed snippets for Codeberg hosted static sites #214

Closed
opened 12 months ago by zsoltsandor · 7 comments

My current stack for my "trying tags, headers, .well-known elements" approach is based on GitLab and Netlify, and I love the options it has for HTTP headers and other code snippets. They could be improved, especially the latter, so we could edit as needed, but anyway, it's a good idea.

I was wondering if there is any alternative that could be used with Codeberg, and preferably made in Europe.

If only the "HTML Imports" link tag has managed to take off and become a standard. I know I could use the snippets feature in PHP, but I want to go bare-bones static. Idk, maybe static frameworks have this, but I have no experience with those yet.

Do you have any good recommendations?

My current stack for my "trying tags, headers, .well-known elements" approach is based on GitLab and Netlify, and I love the options it has for HTTP headers and other code snippets. They could be improved, especially the latter, so we could edit as needed, but anyway, it's a good idea. I was wondering if there is any alternative that could be used with Codeberg, and preferably made in Europe. If only the "HTML Imports" link tag has managed to take off and become a standard. I know I could use the snippets feature in PHP, but I want to go bare-bones static. Idk, maybe static frameworks have this, but I have no experience with those yet. Do you have any good recommendations?
Owner

Codeberg pages are rendered via https://codeberg.org/Codeberg/build-deploy-gitea/src/branch/master/var/www/pages/index.php. If you can think of a convenient, easy-to-use, and safe approach doing this, PR very welcome!

Codeberg pages are rendered via https://codeberg.org/Codeberg/build-deploy-gitea/src/branch/master/var/www/pages/index.php. If you can think of a convenient, easy-to-use, and safe approach doing this, PR very welcome!
Owner
maybe related? https://codeberg.org/Codeberg/build-deploy-gitea/issues/21
Poster

Sort of, but also not sure if entirely.
To my understanding, HTML imports in the link tag was really supposed to be something like PHP include.

Static site generators like Jekyll, Hugo, etc might have something like this baked in?

Sort of, but also not sure if entirely. To my understanding, HTML imports in the link tag was really supposed to be something like PHP include. Static site generators like Jekyll, Hugo, etc might have something like this baked in?
Poster

Apparently I'm not the only one who finds this a lacking feature - and apparently there are workarounds, but no bare-bones HTML solution:
https://css-tricks.com/the-simplest-ways-to-handle-html-includes/

Apparently I'm not the only one who finds this a lacking feature - and apparently there are workarounds, but no bare-bones HTML solution: https://css-tricks.com/the-simplest-ways-to-handle-html-includes/
Owner

Javascript-based includes are surely possible right now ;)

Javascript-based includes are surely possible right now ;)
fnetX added the
pages
label 3 months ago
Collaborator

This should not be something Pages should be doing IMO, they're just there to make a branch accessible as a web page. I think the best way for this would be to make use of the CI (as soon as it exists) with a simple static site generator or a bash script.

This should not be something Pages should be doing IMO, they're just there to make a branch accessible as a web page. I think the best way for this would be to make use of the CI (as soon as it exists) with a simple static site generator or a bash script.
Collaborator

I agree. Since pages is a static hosting solution, every interaction there will dramatically increase complexity. So this will be solved by automatic CI building of pages with one's favourite static site generator.

Any objections to closing this?

I agree. Since pages is a static hosting solution, every interaction there will dramatically increase complexity. So this will be solved by automatic CI building of pages with one's favourite static site generator. Any objections to closing this?
momar closed this issue 1 month ago
Sign in to join this conversation.
No Milestone
No Assignees
4 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.