OleVik / grav-plugin-static-generator

Indexing and static generation of Page(s) for Grav.
MIT License
23 stars 1 forks source link

canonical is localhost #12

Closed pixelfabs closed 1 year ago

pixelfabs commented 4 years ago

Not sure if I'm missing something. I installed a fresh Grav with Quark theme. Generated a static version and all is good. Except the canonical in the <head> remains http://localhost.

Am I missing something? I think it should reflect the page URL

<link rel="canonical" href="http://localhost/typography" />

OleVik commented 3 years ago

Do you have any special settings set in system.yaml? Typically, absolute_urls must be false. In testing I get <link rel="canonical" href="http://localhost/typography" /> from a normal php bin/plugin static-generator page on a fresh installation.

The way most themes are constructed, including Quark, and because of how Grav handles custom base URLs, there's little room for overriding the domain used in canonicals. Only setting custom_base_url to a fully qualified URL will do it.

Are you looking to rewrite the http://localhost part of the canonical?

OleVik commented 1 year ago

Should be solved by v4.