Skip to content
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

Cross reference links can lead to 404 pages #47

Open
NathanLovato opened this issue Feb 25, 2020 · 0 comments
Open

Cross reference links can lead to 404 pages #47

NathanLovato opened this issue Feb 25, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@NathanLovato
Copy link
Contributor

The latest version of the program supports cross-references like [ClassName.method], etc. but the links don't always work. Part of the problem cannot be fixed without input from the user.

The problem

When previewing markdown documents on your desktop, the links should point to markdown files to work, as you're browsing through your file system. E.g. ClassName.md

If you convert to html and/or put the files on the web, the links should point to the page's name or file, ./ClassName or ./ClassName.html or the lowercase equivalents.

Hugo may change the case of the links depending on the website's settings I believe?

Solution

For markdown, I'm currently linking to ../PageName. This should work if you put your pages online with a CMS, but it won't if you output your files as html directly. To solve this, we might need to have an html output that writes links as ../pagename.html#header-name. We can look at how Sphinx and the Godot docs handle that.

In the hugo format, links should probably use the {{< relref >}} shortcode. This shortcode takes a relative path to a markdown document and resolves the final path for you. We have the exact name of the markdown documents so this would work reliably.

@NathanLovato NathanLovato added the bug Something isn't working label Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant