-
Notifications
You must be signed in to change notification settings - Fork 1.3k
add 404 page for bs4_book and Gitbook #1035
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
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can do something for gitbook also and close #1046 too.
I'll take it from here but work on your branch in this PR
|
So I went further with my idea with this.
@apreshill before going further with docs and tests, is this something as you imagined ? Demo :
|
cderv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some changes to made following live review with @apreshill
Overall we are good with this feature
cderv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only thing left is documentation in the book.
Conflicts: NEWS.md
Merge commit 'afadf502bae42334c571da76910e9ca63d59162e' Conflicts: NEWS.md
Conflicts: NEWS.md
|
@yihui Just a friendly ping so that it is on your radar to have a quick thoughts and review from you before deciding to merge this. We can discuss it live tomorrow if you have time to have a look. Thanks! Behavior of this PR is described here: #1035 (comment) |
…w R session; they must be passed explicitly as an argument list
…es like `html_head` to build_404(), and build_404() only creates a raw 404 page, which can be tweaked in split_chapters() later
yihui
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cderv Just two small questions. Thanks!
cderv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for you changes !
That makes a lot of sense to tweak the function this way. Also existing_files() is a useful function ! 😅 Hard to know them all 😉
I guess you found the idea interesting. That left us with
- the choice of what should we do with an existing
404.html: should we copy it (#1035 (comment)) in output dir ? - We need to document this. Where in the book ? Or in which function's help page ? I can do it once we decide.
|
For documentation, perhaps we could add a section in Chapter 6: https://bookdown.org/yihui/bookdown/publishing.html This topic seems to be too small to fit a whole section, though. |
This could indeed be a good place to put it in the Github publishing section as 404.html is supported by it. We don't have a Netlify part yet, but it will also be supported. However, no matter where you publish a 404 page will be created though. I was thinking maybe into:
|
yihui
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can discuss the documentation later. This PR looks good to me now.
|
I opened a new issue to track the documentation. And I'll merge this one then. Thank you ! |
Fix #1025