-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relative paths are not dynamic between files #7
Comments
The problem on the |
This defect can be reproduced well. <head>
...
<base href="../../../"> <!-- three levels below `docs` folder -->
...
</head> Then every relative url is resolved with regard to that base location ... so in `...
<base href="${data.reldir}">
<title>${data.title}</title>
...` place it in ´head` section somewhere before the occurence of the first relative url. For minimalism and performance reasons (avoiding a look into subdirectories), subdirectories containing relevant markdown documents are assumed to be named
Please note the breaking change to rename |
Seems to be working. Closing this issue and opening related issue at #9 |
hmm ... I'm afraid it's not what we finally want, as document local links do not work now. Interesting discussion here ... I think this solution might be more consistent and better:
"uses": [ { "uri": "navigation.md", "reldir": "../" } ] what do you think ? |
I am not to sure about this but the Mechanismentechnik Page does use local links a lot in navigation and the FAQ has quite a few which are working fine (the page got updated to work with v0.3.8 yesterday). I do not like the idea tinkering with every url in the document as I could imagine there are a few side effects. |
Try to click [1] in your example "Die Grundfälle werden gebildet durch Gleichung (6.1)[1]. " https://goessner.github.io/Mechanismentechnik/06_Getriebekinematik.md/Aufgabe_6.9.html What do you suggest ? btw: FAQ is in the root |
I don't know how much control we have, regarding the parsing of markdown to html. I placed all files of |
I think ...
[[1]](#1) works as is. Images located in a
So why should we translate urls in users own markdown files ? |
I saw the deprecated link with We do translate the users markdown files into html anyways. The user would not care if we translate Alternatively we could drop |
It is otherwise round:
I am clearly favor scenario 2, where translation is necessary only in cases, where markup is reused by documents distributed in different subdirectories only. Can you please investigate, if embedding navigation bar markup in a |
The best solution I have found to do that is to:
The styling of the navigation may look like:
And elements inside the navigation html can be styled like:
The hyperlinks are relative to the respective file, so this should solve the problem and the link to the To set the |
... working example somewhere ... ? |
Sent an Email to you to review this proposal. |
Started with ver. 0.3.8 there are no constraints with Need to update Release Notes. |
What I like with this approach, is it's simplicity and the fact, that it's only affecting the corresponding template. Let's go with it for now. Please be aware, that in example 5.9 Fig. 0 and the first internal link is broken ... |
The proposal can be seen in action on the Mechanismentechnik-Page. I am working on an update for microjam, but I am still working on the implementation details. |
Given the following folder structure:
FileA
andindex
can not use the samenavigation
,theme/template.js
,theme/style.css
, since their respective relative paths differ.A quick (and dirty) workaround is to move
index
into a directory to align the relative paths (so they can just use../navigation.html
,../theme/template.js
...), but this obviously is no good solution since it forces all files to be always on the same level.The text was updated successfully, but these errors were encountered: