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

Check if links to local files exist #87

Closed
cirosantilli opened this issue Jul 4, 2020 · 1 comment
Closed

Check if links to local files exist #87

cirosantilli opened this issue Jul 4, 2020 · 1 comment

Comments

@cirosantilli
Copy link
Contributor

E.g. if your link does not start with https?://, it points to a local file, and so that file should exist otherwise error, e.g.:

See this code example: \a[myfile.c].

If myfile.c is renamed, we want to get an error on the cirodown build of the above line.

@cirosantilli
Copy link
Contributor Author

cirosantilli commented Jul 23, 2021

OK, started implementing, and noticed that it is not in general possible without the user explicitly indicating it.

For example, https://github.com/cirosantilli/cirosantilli.github.io/tree/da296c3c933704484d5cd1a42754f60ec00f672b under https://cirosantilli.com contains links to https://cirosantilli.com/markdown-style-guide whose course lives in a non-cirodown repository.

In the server, we just can't know what random paths are mounted to what.

We should therefore just add a {local} boolean argument to those links. We can then also drop known protocol detection entirely.

This also made me notice that local links would already be breaking in case of scope rendering on subdirs with --split-headers, we can also take this chance to fix that as well.

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

No branches or pull requests

1 participant