Allow serving custom error page#393

Merged
crapStone merged 2 commits from Gnaaarwhal/pages-server:error-page into main 2024-11-17 17:28:53 +01:00
Contributor

It might be useful for those self-hosting a Codeberg Pages instance to be able to serve a different error page than the one embedded with go:embed

It might be useful for those self-hosting a Codeberg Pages instance to be able to serve a different error page than the one embedded with go:embed
crapStone force-pushed error-page from 72f83a4144 to ef44077f7b
Some checks failed
ci/woodpecker/pr/lint Pipeline failed
ci/woodpecker/pr/build Pipeline was successful
2024-11-05 22:01:50 +01:00
Compare
html/html.go Outdated
@ -54,0 +57,4 @@
contents, err := os.ReadFile("custom/error.html")
if err != nil {
if !os.IsNotExist(err) {
log.Err(err).Msg("could not load custom error page")
Owner

It would be nice to give the users a absolute path where the pages-server expects the file to be.

It would be nice to give the users a absolute path where the pages-server expects the file to be.
crapStone marked this conversation as resolved
Gnaaarwhal force-pushed error-page from ef44077f7b
Some checks failed
ci/woodpecker/pr/lint Pipeline failed
ci/woodpecker/pr/build Pipeline was successful
to df06003584
Some checks failed
ci/woodpecker/pr/lint Pipeline failed
ci/woodpecker/pr/build Pipeline failed
2024-11-09 18:22:49 +01:00
Compare
run formatters
Some checks failed
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/build Pipeline failed
71f01e6dd0
Owner

Thanks for your contribution!

Thanks for your contribution!
Sign in to join this conversation.
No description provided.