codeguy / php-the-right-way

An easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative tutorials around the Web
https://www.phptherightway.com
Other
9.03k stars 3.25k forks source link

Remove baseurl #969

Open petk opened 1 year ago

petk commented 1 year ago

The site.baseurl configuration value should only be used when the resulting site lives at a subpath of the domain [1].

This also fixes the syntax highlighting on pages (basics, functional programming etc.).

1: https://ben.balter.com/jekyll-style-guide/config/#baseurl

jrfnl commented 1 year ago

The point of having the setup like this, is that it allows to test the site locally. If these things are removed, in my experience, things go wonky when running the Jekyll site locally. (Note: this may have been fixed in Jekyll/the GH Pages plugin since the original setup, but I don't know for sure)

petk commented 1 year ago

The baseurl doesn't work neither locally. It is overwritten to an empty value on GitHub pages.

User should create their own baseurl value for these forked repos to be displayed on username.github.io/php-the-right-way which isn't even wanted actually due to search engines complications.

For the local installation, Jekyll page is displayed on the http://localhost:4000 so there isn't any baseurl there anyway.

jrfnl commented 1 year ago

As I said, things may have been fixed in Jekyll/GHPages since the original setup ;-) Good to know that it still works locally without the baseurl with the current versions.

Xymph commented 1 year ago

Punting this to @codeguy too.