-
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
file-system to domain remap example #2
Conversation
Awesome, thanks for the PR! I tried it on the lychee docs repo as suggested and it works.
However, be aware that this uses your shell's glob handling: it expands the glob expression before calling lychee. That means, that in the case of a large directory, this call could fail because the input becomes too big. In order to use lychee's own Rust-based glob matcher, you'd have to put it in quotes. (That's just to tell the shell to not touch the string.) lychee --base https://lychee.cli.rs --remap '(.*).md $1.html' "src/content/docs/**.md*" But this would lead to an error message: Error: UNIX glob pattern is invalid
Caused by:
Pattern syntax error near position 19: recursive wildcards must form a single path component The problem is the final lychee --base https://lychee.cli.rs --remap '(.*).md $1.html' "src/content/docs/**/*.md" Can you change that in your version, or was there a reason for the As a side note, I think For example, Additionally, the regex doesn't say that the string ends at A more accurate expression would be lychee --dump --remap '(.*)\.md$ $1.html' test.html I leave it up to you to decide if you want to add a remark about this or not. |
The lychee docs include some
I think this may be getting a bit far-afield from this documentation topic though. Perhaps we should drop the lychee docs example anyway, particularly given that it has an intentional link to a markdown file that getting unintentionally failed due to the conversion. (No idea how to solve that either.) |
Ah! Got it. That makes sense. 👍
Yeah, tricky one. The I touched on that here:
Fully agree.
I kinda liked the lychee docs example. It's a very practical use-case.
If you like, you can update the command or, alternatively, we drop that part. A middle-ground would be to change |
OK, I'm on board with keeping the second part. I think it adds a practical more complex example to the initial simpler example and might end up actually being helpful to someone. I've updated it as you suggested. |
Looks good. Thanks for adding the example. 😃 |
Based on #1