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

Open
opened 1 month ago by zsoltsandor · 5 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?
hw commented 1 month ago
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!
hw commented 1 month ago
Owner
maybe related? https://codeberg.org/Codeberg/build-deploy-gitea/issues/21
zsoltsandor commented 1 month ago
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?
zsoltsandor commented 1 month ago
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/
hw commented 1 month ago
Owner

Javascript-based includes are surely possible right now ;)

Javascript-based includes are surely possible right now ;)
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.