theobald-software/theobald-software.github.io

How to rename directory?

fam2342 opened this issue · 5 comments

I tried to rename the "q-delta" directory to "deltaq" because it looks so wrong in the beautified URLs:
(d230fd7)
(6a719c8)

I noticed that the name appears in all md files inside the directory as parent: q-delta. Seems pretty redundant? I changed it, but Jekyll still fails to generate the static html. It sends me these very helpful emails:

The page build failed for the master branch with the following error:
Page build failed.

The Settings page of the repo on github.com doesn't offer any clues what's wrong.
How can I find out, what's wrong? What is the correct procedure to rename a directory?

The 'parent: q-delta' is there to establish a place in the website's hierarchy, used for the side-menu and breadcrumb path. Jekyll does not have a way for us to obtain the name of the directory that the file is in, unfortunately. Thus, this field is very important and should always match the directory name and the 'childidentifier' frontmatter field that the q-delta page itself has.

The e-mails sent by Github aren't the clearest and the settings menu does not elaborate either. We can't change this. The only way to figure out what doesn't go well is by running the website locally. I'll do that in a bit and see what's preventing the build from passing.

The changes you've made in order to rename the directory successfully were exactly as they should be done.

Very coincidentally, this is the first page ever starting with '/de' ('/deltaq/') other than the '/de' for the language. This surfaced a very edge-case bug where the language mechanism checks for '/de' in the url at some point and didn't like that it found two occurrences. I've fixed this so it cannot happen in the future.

I've pushed the fix and the website is building again properly. The url is now with 'deltaq'!

Apologies for the inconvenience,
Erwin

Thanks for fixing this. What about using <a href="../"> instead of absolute paths?

For the links, working with relative paths would work out and it was the initial choice I've made for implementation. However, the problem was that in order to render the side-menu and breadcrumb, also the human-readable names were needed. In order to obtain those, the actual Jekyll page entities were needed and those could not be obtained by any other means than this mechanism.

OK, I see, thanks for the explanation.