www: Various documentation improvements#1635
Merged
marvinhagemeister merged 11 commits intoAug 16, 2023
Merged
Conversation
deer
approved these changes
Aug 16, 2023
| link: "latest", | ||
| pages: [ | ||
| ["modifying-the-head", "Modifying the <head>", "link:latest"], | ||
| ["setting-the-language", "Setting the language", "link:latest"], |
Contributor
There was a problem hiding this comment.
Is setting the language now such an obvious thing that the documentation should be deleted? Or could it be beneficial to completely redo the example to account for the new functionality?
Contributor
Author
There was a problem hiding this comment.
Setting the language is now mostly:
- Open the
_app.tsxfile - Add the
langattribute to the<html>-tag
Not sure if we need a full page for that. I'd rather have a note for that on a page that deals with internationalization overall. Like it shows how to parse the Accept header (or uses a lib for that), how to user translation strings and as part of that a short section on setting the lang attribute.
Co-authored-by: Reed von Redwitz <reed+github@vonredwitz.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
_app.tsxapp wrapper in our docs but in the code they were calledappTemplate. Switched that over toappWrappereverywhereLayoutsdocs and call itLayoutsinstead ofRoute Layoutssetting the langpage in the canary docs as that was only necessary in older Fresh version's, because you couldn't render the<html>tag yourself. With Fresh 1.4 you can.Route Groupsdoc intoRouting.Middlewaresinstead ofRoute middlewares.defineApp,defineLayoutanddefineRoute