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

How to link to an additional page from README? #448

Open
untitaker opened this issue Jun 25, 2023 · 5 comments · Fixed by #469
Open

How to link to an additional page from README? #448

untitaker opened this issue Jun 25, 2023 · 5 comments · Fixed by #469

Comments

@untitaker
Copy link
Contributor

I have a feature overview on https://untitaker.github.io/spacemod/ where I would like to link into the "Matching modes" page.

I would like my README to link to ./docs/matching.md (so following the link in GitHub's UI works), while the oranda landing page should link to https://untitaker.github.io/spacemod/matching/.

Is that possible or should I go with mdbook? I find mdbook overkill for simple docs.

@shadows-withal
Copy link
Contributor

Hey! I believe this is a shortcoming with our current approach to additional pages - we rewrite the page paths for you, meaning that any subdirectory is discarded, which is why using a relative link like that currently does not work, but it's definitely something I personally want to make work in the future.

@untitaker
Copy link
Contributor Author

untitaker commented Jun 26, 2023

from my testing the link is not being rewritten at all:

<h2>Matching Modes</h2>
<p>By default, you use regexes to replace text. See <a href="./docs/matching.md" rel="noopener noreferrer">Matching
modes</a> for the alternative modes that <code>spacemod</code> supports.</p>
<h2>Alternatives</h2>
<p>There are many tools like <code>spacemod</code>, some of which may suit your needs better. Take a look at <a href="./docs/alternatives.md" rel="noopener noreferrer">Alternatives</a>.</p>
<h2>License</h2>

above html snippet is directly from https://untitaker.github.io/spacemod/, README is at https://github.com/untitaker/spacemod/blob/main/README.md

@shadows-withal
Copy link
Contributor

Oh, in that case that's definitely a bug we should fix ASAP. Will reproduce and file an issue separately

@untitaker
Copy link
Contributor Author

untitaker commented Jul 3, 2023

@shadows-withal I don't think this got fully fixed in 0.1.0. Adding a subpage from a subdirectory already worked before the fix afaict. the problem is links to it in the README

check out this PR: untitaker/spacemod#21

and run oranda dev, then try clicking on "Matching modes" further down the page. it directs to localhost/docs/matching.md when the correct link would be localhost/spacemod/matching/

but then i don't know if that was ever intended to work at all

@Gankra
Copy link
Contributor

Gankra commented Jul 3, 2023

Yeah we don't yet support that. I've sketched out part of the implementation here: #512

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants