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

Incompatibility with old Pages release #27

Closed
opened 2021年12月05日 17:07:09 +01:00 by circlebuilder · 4 comments

I just noticed that I either need to adjust my old Pages website, or that maybe some change to Pages implementation may be made, idk.

Note that I did not make any changes since the new Pages release. And now for instance this URL:

https://fediverse.codeberg.page/ideate/

Will try to load the following in the address bar and 404's:

https://fediverse.codeberg.page/ideate/.html

So I should either remove all the forward slashes throughout the site, or Pages should support that as before.

Here's the Jekyll source of the site and the generated HTML output.

I just noticed that I either need to adjust my [old Pages website](https://fediverse.codeberg.page), or that maybe some change to Pages implementation may be made, idk. Note that I did not make any changes since the new Pages release. And now for instance this URL: > `https://fediverse.codeberg.page/ideate/` Will try to load the following in the address bar and 404's: > `https://fediverse.codeberg.page/ideate/.html` So I should either remove all the forward slashes throughout the site, or Pages should support that as before. Here's the [Jekyll source](https://codeberg.org/fediverse/fedi-foundation) of the site and the [generated HTML](https://codeberg.org/fediverse/pages) output.
Owner
Copy link

Thanks, that's actually something I missed in #23: in the example from the last comment there, /path/example2/ redirects to the non-existant /path/example2/.html if example2.html exists.

I have fixed this in a hotfix that should now be deployed to the server, so that it works like you hopefully expect - would be nice if you can try it and report if it works correctly.

Note though that your use-case isn't supported by GitHub either: https://go-acme.github.io/lego/dns/index works (to refer to index.html), while https://go-acme.github.io/lego/dns/index/ displays a 404 error. Looks to me like in this case Jekyll confuses GitHub-style file generation (/ideate.html with link /ideate) with links for non-GitHub-style files (/ideate/index.html with link /ideate/).

Edit: sorry, deployment failed due to a Codeberg update, now it should be working.

Thanks, that's actually something I missed in #23: in the example from the last comment there, `/path/example2/` redirects to the non-existant `/path/example2/.html` if `example2.html` exists. I have fixed this in a hotfix that should now be deployed to the server, so that it works like you hopefully expect - would be nice if you can try it and report if it works correctly. Note though that your use-case isn't supported by GitHub either: https://go-acme.github.io/lego/dns/index works (to refer to index.html), while https://go-acme.github.io/lego/dns/index/ displays a 404 error. Looks to me like in this case Jekyll confuses GitHub-style file generation (`/ideate.html` with link `/ideate`) with links for non-GitHub-style files (`/ideate/index.html` with link `/ideate/`). Edit: sorry, deployment failed due to a Codeberg update, now it should be working.

Thank you. It works now, but still a bit differently than before, because the URL on the address bar is extended with .html and before that didn't happen.

For (non-techie) people the URL's look a bit more unwieldy and harder to memorize, and they don't know they can omit the .html when sharing the link.

They will share e.g. https://fedi.foundation/ideate.html instead of just https://fedi.foundation/ideate or even fedi.foundation/ideate.

On Github Pages the page e.g. internet-of-beefs.html is shown in the address bar at https://humanetech.community/2020/01/internet-of-beefs without extension.

Thank you. It works now, but still a bit differently than before, because the URL on the address bar is extended with `.html` and before that didn't happen. For (non-techie) people the URL's look a bit more unwieldy and harder to memorize, and they don't know they can omit the `.html` when sharing the link. They will share e.g. [`https://fedi.foundation/ideate.html`](https://fediverse.codeberg.page/ideate.html) instead of just `https://fedi.foundation/ideate` or even `fedi.foundation/ideate`. On Github Pages the page e.g. `internet-of-beefs.html` is shown in the address bar at [`https://humanetech.community/2020/01/internet-of-beefs`](https://humanetech.community/2020/01/internet-of-beefs) without extension.
Owner
Copy link

Yup, that was a deliberate decision: there should only be one URL for a given resource, and GitHub completely ignores that: https://humanetech.community/2020/01/internet-of-beefs and https://humanetech.community/2020/01/internet-of-beefs.html are both valid, so if both links are used somewhere it can for example end up twice in search results.

We try to adhere to standards that any normal static webserver follows. The fact that /ideate works and redirects to the correct URL is just a compatibility fix for GitHub pages & Jekyll.

If you want to use URLs like /ideate/ in Jekyll, the permalink option must end with a slash - then, a folder with a file index.html is generated, which is how basically every other static site generator works.

TL;DR: I'm a bit mad at GitHub & Jekyll for doing things in a non-standard way, and Codeberg Pages tries to adhere to the common web standards as much as possible. 🙃

Yup, that was a deliberate decision: there should only be one URL for a given resource, and GitHub completely ignores that: https://humanetech.community/2020/01/internet-of-beefs and https://humanetech.community/2020/01/internet-of-beefs.html are both valid, so if both links are used somewhere it can for example end up twice in search results. We try to adhere to standards that any normal static webserver follows. The fact that `/ideate` works and redirects to the correct URL is just a compatibility fix for GitHub pages & Jekyll. If you want to use URLs like `/ideate/` in Jekyll, the `permalink` option must end with a slash - then, a folder with a file `index.html` is generated, which is how basically every other static site generator works. TL;DR: I'm a bit mad at GitHub & Jekyll for doing things in a non-standard way, and Codeberg Pages tries to adhere to the common web standards as much as possible. 🙃

Ah okay, that is super useful info. TIL! Thanks much, @momar 👍

Ah okay, that is super useful info. TIL! Thanks much, @momar 👍
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
2 participants
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#27
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?