Skip to content

Commit

Permalink
Docs: Fix long words breaking the site on small screens (#2521)
Browse files Browse the repository at this point in the history
* Add overflow wrap for long words

* Fix specific case of overflowing text
  • Loading branch information
FireIsGood authored Jun 13, 2024
1 parent c7f601f commit 68a7002
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/content/documentation/content/shortcodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ This will create a shortcode `books` with the argument `path` pointing to a `.to
titles and descriptions. They will flow with the rest of the document in which `books` is called.

Shortcodes are rendered before the page's Markdown is parsed so they don't have access to the page's table of contents.
Because of that, you also cannot use the [`get_page`](@/documentation/templates/overview.md#get-page)/[`get_section`](@/documentation/templates/overview.md#get-section)/[`get_taxonomy`](@/documentation/templates/overview.md#get-taxonomy)/[`get_taxonomy_term`](@/documentation/templates/overview.md#get-taxonomy-term) global functions. It might work while
Because of that, you also cannot use the [`get_page`](@/documentation/templates/overview.md#get-page) / [`get_section`](@/documentation/templates/overview.md#get-section) / [`get_taxonomy`](@/documentation/templates/overview.md#get-taxonomy) / [`get_taxonomy_term`](@/documentation/templates/overview.md#get-taxonomy-term) global functions. It might work while
running `zola serve` because it has been loaded but it will fail during `zola build`.

## Using shortcodes
Expand Down
3 changes: 3 additions & 0 deletions docs/sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ body {
display: flex;
flex-direction: column;
min-height: 100vh;

// Stop long words from breaking mobile
overflow-wrap: break-word;
}

img {
Expand Down

0 comments on commit 68a7002

Please sign in to comment.