-
Notifications
You must be signed in to change notification settings - Fork 1
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
Removing '.md' strings from template files breaks some URLs #45
Comments
Is there an example of a template file containing a URL with an embedded markdown file reference we may use as a test case? |
One thought is to use a character entity encoding for the dot "." in the |
In the URL you would replace |
Nice @servilla. The For an example, see this news article, specifically the hyperlinked "COUNTER Code of Practice for Research Data in Repositories". I've noted this work around in the content-x contributing guidelines under the "Formatting and style" section. Call this issue "closed" for now? |
In content-x, content creators use relative links between markdown templates to simulate navigation among cross-referenced web pages. Before releasing new content, the relative links are converted from the GitHub context, to the web-x context. One step in this process is the removal of '.md' strings from template file contents. See:
web-x/utilities/build.py
Line 262 in 198ac37
This is all fine and good until a markdown document is part of the target URL, in which case build.py strips the '.md' and web-x readers get a 404 when clicking on the link.
I was unsuccessful in attempts at solving this issue via regex with a backwards looking conditional (i.e. don't remove '.md' when part of a URL).
Other ideas?
The text was updated successfully, but these errors were encountered: