-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* language menu * allow for subdir in baseURL * Update netlify.toml and github actions to use Hugo 0.121.1 * Documented i18n approaches in exampleSite * Attempted & Abandoned images from assets as recommended approach in content pages- it seems Hugo expects to access those only programmatically, not via markdown. --------- Co-authored-by: Zdenek K <[email protected]>
- Loading branch information
1 parent
a1772f4
commit 4191af6
Showing
45 changed files
with
337 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
File renamed without changes.
File renamed without changes
Binary file added
BIN
+148 KB
...ets/images/asset-happy-ethnic-woman-sitting-at-table-with-laptop-3769021.de.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+144 KB
...assets/images/asset-happy-ethnic-woman-sitting-at-table-with-laptop-3769021.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
# Striking header background image, Ideal images are homogenous around the centre and contrasting to the text. Non-ideal images can use `title_guard` | ||
header_image: "images/cover-image.jpg" | ||
# | ||
# When set true, uses video from custom_header_video.html partial, instead of header_image | ||
header_use_video: false | ||
# | ||
# Optional header logo. CSS: `#blog-logo`, with max-height defined, optimize to prevent scaling | ||
header_logo: "images/chef-hat.png" | ||
# | ||
# Headers are safeHTML, you can use HTML tags such as b,i,u,br | ||
header_headline: "Erika Musterfrau" | ||
header_subheadline: "<b>Ernährungs</b>hilfe & <b>Koch</b>beratung" | ||
|
||
# Add a 'Go back to top' item to the navigation menu | ||
# Title: name of navigation menu entry | ||
# Weight (i. e. position in menu): none = no menu entry, first = add as first entry, last = ad as last entry | ||
nav_to_top_title: "Nach oben" | ||
nav_to_top_weight: last | ||
--- |
Binary file added
BIN
+30.2 KB
...eSite/content/de/de-happy-ethnic-woman-sitting-at-table-with-laptop-3769021.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
title: "Über mich (DE folder)" | ||
weight: 3 | ||
header_menu: true | ||
--- | ||
|
||
This demonstates localized content placed in dedicated language folder, `content/de`. This way you won't have to use localization suffix with the `.md` file. Both localisation approaches (separate folder, suffixes in the same folder) can be used and even mixed. | ||
|
||
See i18n configuration in `[languages]` section of `config.toml`. | ||
|
||
#### Local content | ||
Localised content can be put in dedicated folder `content/de/`. Images should be naturally found from there: | ||
![Image from content/de ](de-happy-ethnic-woman-sitting-at-table-with-laptop-3769021.jpg) | ||
|
||
#### Assets | ||
Images in assets folder can be localised, conventionally by adding `.de` suffix. However, assets may be tricky, see next section for details | ||
![Broken DE Image from assets](images/asset-happy-ethnic-woman-sitting-at-table-with-laptop-3769021.de.jpg) | ||
|
||
Note the filename of this section is a bit artificial to avoid conflict with other examples in en folder. If named the same, this one wouldn't render. However normally you wouldn't have one page localized two ways. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: "Willkommen" | ||
weight: 1 | ||
--- | ||
|
||
Das ist die deutsche Beispielseite. | ||
|
||
`Hugo-Scroll` theme alternates colors of sections that are placed on single page. | ||
The landing screen is meant to be visually striking. | ||
|
||
Single-page approach is oriented towards small to medium content length, that won't overwhelm the user. | ||
You can also delegate lengthier, less important or more sizeable content to [dedicated pages](services). | ||
|
||
> The belly rules the mind. --- spanish proverb | ||
By the way this welcome section won't show in the cover menu. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: "Das biete ich an" | ||
header_menu_title: "Angebot" | ||
navigation_menu_title: "Mein Angebot" | ||
weight: 2 | ||
header_menu: true | ||
--- | ||
|
||
Feature notice: This section displays options to customize title: | ||
|
||
- has a normal section title (`title` = "The Services I Offer"), | ||
- custom welcome screen title (`header_menu_title` = "Services"), | ||
- custom navigation menu title (`navigation_menu_title` = "My Services"). | ||
|
||
That is the important part, right? You want to know what I can do for you. This is why I put this right up there into the header menu of the website. | ||
|
||
--- | ||
|
||
### Nutrition Coaching | ||
|
||
This is not an easy task. | ||
You will likely have to pay money for this. | ||
|
||
### Chef Consulting | ||
|
||
I can raise your table culture! | ||
|
||
![Let us get started on a clean slate](/images/woman-pouring-juice-on-glass-3184192.jpg) | ||
|
||
Want to learn more about my services? See [dedicated page](services) with more details. |
File renamed without changes.
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
title: "Mein Angebot" | ||
--- | ||
|
||
Das ist die deutsche Variante von meinem Angebot. | ||
|
||
It carries a lot more detail than what I put on the homepage - I swear! | ||
|
||
You want to know what I can do for you? | ||
|
||
Well, let me tell ya! | ||
|
||
--- | ||
|
||
## Nutrition Coaching | ||
|
||
This is not an easy task. You will likely have to pay money for this. You know what - let us look at a nice picture first. | ||
|
||
<!-- Note how static images need to have leading slash from the dedicated pages --> | ||
|
||
![Nice picture to make you pay me ;-)](/images/selective-focus-photography-of-pasta-with-tomato-and-basil-1279330.jpg) | ||
|
||
Wow. That was nice, right? Well, call me and let us talk. | ||
|
||
--- | ||
|
||
## Chef Consulting | ||
|
||
Did you see the picture above? I can show you how to go from | ||
|
||
![Let us get started on a clean slate](/images/board-bunch-cooking-food-349609.jpg) | ||
|
||
to | ||
|
||
![Let us get started on a clean slate](/images/woman-pouring-juice-on-glass-3184192.jpg) | ||
|
||
in estimated seconds. | ||
|
||
Don't believe me? Here are some bullets | ||
|
||
* If anyone can teach you to cook, I can | ||
* And if you already know how to cook, I will make you that much better |
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: "Über mich (shared folder)" | ||
weight: 3 | ||
header_menu: true | ||
--- | ||
|
||
This demonstates localized variants `about-me.de.md` placed along the primary language content, such as `content/en`. Both localisation approaches (separate folder, suffixes in the same folder) can be used and mixed. | ||
|
||
#### Local content | ||
When localised page variants are placed along, images of other languages can't be used directly. You would need to use `.de`-suffixed copy of the image: `![Jane Doe](en-happy-ethnic-woman-sitting-at-table-with-laptop-3769021.de.jpg)` | ||
Consider using assets instead. | ||
|
||
Images from local content location can't be pipeline-processed. | ||
|
||
#### Static | ||
Alternatively, images can be injected from `static/images`: | ||
![Jane Doe](/images/static-happy-ethnic-woman-sitting-at-table-with-laptop-3769021.jpg) | ||
Note the leading `/` is required in this case. | ||
Images from static location can't be pipeline-processed and are always copied when publishing the site, even if not linked from any page. | ||
|
||
#### Assets | ||
Latest Hugo version supports injection from `assets` via natural Markdown notation, which empowers this approach for injecting images since pipeline processing (resizing etc) can be used. However, It only worked for me with the local test deployment, there were issues while deploying previews Netlify. Possible workaround would be to use custom shortcode to "touch" the image via [Resources.GetMatch](https://gohugo.io/functions/resources/getmatch/). I hope this gets fixed someday. | ||
|
||
![Broken image from assets](images/asset-happy-ethnic-woman-sitting-at-table-with-laptop-3769021.jpg) | ||
Historically, Linking image from `assets` folder worked only via Hugo-specific shortcode, there was [a discussion with suggestions](https://discourse.gohugo.io/t/how-to-show-images-on-post-pages-if-theyre-located-in-the-assets-folder/34276/14). | ||
|
||
Note that using images form assets folder is the only way to apply pipeline processing, such as resizing, when building the site. Fore more details, read about [asset vs static difference](https://discourse.gohugo.io/t/difference-between-asset-and-static-folder/41203) | ||
|
||
Assets are only published if linked from a content page. |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: "Contact" | ||
weight: 4 | ||
header_menu: true | ||
--- | ||
|
||
{{<contact_list>}} | ||
|
||
Let us get in touch! |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: "GitHub" | ||
weight: 99 | ||
header_menu: true | ||
external: https://github.com/zjedi/hugo-scroll | ||
--- |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
headless: true | ||
--- |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: "Brief Legal Information" | ||
weight: 98 | ||
header_menu_title: "Legal" | ||
navigation_menu_title: "Legal stuff" | ||
header_menu: true | ||
detailed_page_path: /legal/ | ||
detailed_page_homepage_content: true | ||
--- | ||
The file **legal-brief.md** creates an internal link on the cover page without the leading icon. | ||
|
||
If the parameter `detailed_page_homepage_content` is set to false neither this section nor the navigation menu entry will be shown (but the link on the cover page will be). | ||
|
||
If `detailed_page_homepage_content` is set to true or is missing at all, the link, navigation menu and the content will be rendered. In that case this section might contain less or just summarized information compared to the single page referenced by the parameter `detailed_page_path`. | ||
|
||
Want to see more about the details? See [dedicated page](legal) with more details or hit the button 'Legal' on the cover page. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
footer_menu_title: License | ||
footer_menu: true | ||
detailed_page_path: /license/ | ||
detailed_page_homepage_content: false | ||
weight: 91 | ||
--- |
File renamed without changes.
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: "The single page referenced to by the Legal button on the cover page" | ||
--- | ||
This file is a single page and is referenced by the button `Legal` on the cover start page. | ||
|
||
It can contain more or additional information than the dedicated section on the homepage. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
title: Hugo Scroll License | ||
--- | ||
|
||
The MIT License (MIT) | ||
|
||
Copyright (c) 2020 Jan Raasch | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains 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
This file contains 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
Binary file modified
BIN
-3.72 MB
(1.3%)
exampleSite/static/images/board-bunch-cooking-food-349609.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-492 KB
...eSite/static/images/happy-ethnic-woman-sitting-at-table-with-laptop-3769021.jpg
Binary file not shown.
Binary file modified
BIN
-1.38 MB
(2.6%)
...c/images/selective-focus-photography-of-pasta-with-tomato-and-basil-1279330.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+33.9 KB
...tatic/images/static-happy-ethnic-woman-sitting-at-table-with-laptop-3769021.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.53 MB
(3.2%)
exampleSite/static/images/woman-pouring-juice-on-glass-3184192.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.