-
Notifications
You must be signed in to change notification settings - Fork 90
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
Links to static files are broken #639
Labels
bug
Something isn’t working
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider the following HTML:
The
img[src]
attribute is rewritten as expected, but thea[href]
is not, so you get this:We do rewrite
a[href]
attribute when there’s alsoa[download]
:https://github.com/observablehq/cli/blob/205d09b88907899a63fe9f4931715456d4055b6d/src/markdown.ts#L326
We don’t blanketly rewrite
a[href]
because it’s often used to link to another page, and pages don’t live in_file
. But we should be able to tell whether a link is a link to a page or not (because we know how to resolve pages) — and for that matter, we want to normalize and rewrite links to pages anyway (to remove.md
and to add.html
for non-clean URLs).The text was updated successfully, but these errors were encountered: