Issues with URL gen and relative_url Filter #80
Replies: 5 comments
-
First, I see numerous threads that seem to imply that all internal website links need to be created with the relative_url filter. This would be a hassle, but certainly a reasonable step. So we shouldn't regard our solutions as being flawed if they require working on the links we have hard coded in our pages. However, the filter seems to convert "foo/" into "/pages/IviFoundation/foo". However, currently the generated site really wants to see "/foo". A chain of thought and experiments:
This seems to imply that something in just-the-docs is using the same algorithm as the relative_url filter. I suppose more likely, just-the-docs really uses the relative-url filter when it generates all of its links (of course including those in head.html).
|
Beta Was this translation helpful? Give feedback.
-
Completed the experiment of checking URL variables, this time modifying about/default.html (chosen because there are several URLs on this page). It displays the following: The following is Diagnostic data: Diagnostic: the baseurl is “/pages/IviFoundation” So, it seems that the basic problem is that the baseurl is set to /pages/IviFoundation when the site is served from github (for some reason???). |
Beta Was this translation helpful? Give feedback.
-
This seems to describe our problem: github/pages-gem#350 |
Beta Was this translation helpful? Give feedback.
-
Tried setting baseurl to "/". THis is what node prefers, although the github pages articles say not to do so. It didn't change behavior. Furthermore, it is overwritten to pages/IviFoundation also. |
Beta Was this translation helpful? Give feedback.
-
For posterity,here is the basic problem: the action, configure_pages sets some environment variables, and otherwise communicates with pages so that the baseurl was overriden from what we set in the _config.yml (exact mechanism still not clear to me). However, pairing configure_pages with jekyll-build-pages resolved the primary problem with baseurl. It also has the unfortunate side affect of changing the pages that are included in the left-hand navigation, so that needs to be resolved subsequently. |
Beta Was this translation helpful? Give feedback.
-
This discussion is to capture thoughts and experiments relating to the problem that the relative_url doesn't seem to do the right thing.
I probably didn't start taking notes soon enough because some of my experiments are running together in my mind. But I will put tests and thoughts in separate posting below. Others looking at this should do the same!! Please!
Beta Was this translation helpful? Give feedback.
All reactions