forked from EclipseFdn/hugo-solstice-theme
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multilingual support for the testimonials component EclipseFdn#165
Added multilingual + multi testimonial set support Signed-off-by: Martin Lowe <martin.lowe@eclipse-foundation.org>
- Loading branch information
1 parent
d207557
commit 8657f24
Showing
10 changed files
with
147 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: "Testimonials" | ||
date: 2019-04-17T15:52:22-04:00 | ||
description: "" | ||
categories: [] | ||
keywords: [] | ||
slug: "" | ||
aliases: [] | ||
toc: false | ||
draft: false | ||
--- | ||
|
||
You can add testimonials to a markdown file using the shortcode **{{< testimonials >}}** | ||
|
||
To add testimonials, create a **testimonials.yml** file in the data folder and add the code below: | ||
|
||
~~~~ | ||
items: | ||
- | ||
text: Text of the testimonial 1 | ||
title: Name of the person | ||
- | ||
text: Text of the testimonial 2 | ||
title: Name of the person | ||
~~~~ | ||
|
||
## Base data source | ||
|
||
{{< testimonials >}} | ||
|
||
## With localized copies EN + FR, w/ fallback in `./data` | ||
|
||
{{< testimonials source="localized_testimonials">}} | ||
|
||
## With localized copies EN + FR, w/o fallback in `./data` | ||
|
||
{{< testimonials source="localized_testimonials_no_fallback" >}} |
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,37 @@ | ||
--- | ||
title: "Testimonials" | ||
date: 2019-04-17T15:52:22-04:00 | ||
description: "" | ||
categories: [] | ||
keywords: [] | ||
slug: "" | ||
aliases: [] | ||
toc: false | ||
draft: false | ||
--- | ||
|
||
You can add testimonials to a markdown file using the shortcode **{{< testimonials >}}** | ||
|
||
To add testimonials, create a **testimonials.yml** file in the data folder and add the code below: | ||
|
||
~~~~ | ||
items: | ||
- | ||
text: Text of the testimonial 1 | ||
title: Name of the person | ||
- | ||
text: Text of the testimonial 2 | ||
title: Name of the person | ||
~~~~ | ||
|
||
## Base data source | ||
|
||
{{< testimonials >}} | ||
|
||
## With localized copies EN + FR, w/ fallback in `./data` | ||
|
||
{{< testimonials source="localized_testimonials">}} | ||
|
||
## With localized copies EN + FR, w/o fallback in `./data` | ||
|
||
{{< testimonials source="localized_testimonials_no_fallback" >}} |
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,10 @@ | ||
items: | ||
- | ||
text: Text of the testimonial 1(localized, en) | ||
title: Name of the person | ||
- | ||
text: Text of the testimonial 2 | ||
title: Name of the person | ||
- | ||
text: Text of the testimonial 3 | ||
title: Name of the person |
10 changes: 10 additions & 0 deletions
10
exampleSite/data/en/localized_testimonials_no_fallback.yml
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,10 @@ | ||
items: | ||
- | ||
text: Text of the testimonial 1(localized no fallback, en) | ||
title: Name of the person | ||
- | ||
text: Text of the testimonial 2 | ||
title: Name of the person | ||
- | ||
text: Text of the testimonial 3 | ||
title: Name of the person |
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,10 @@ | ||
items: | ||
- | ||
text: Text of the testimonial 1(localized, fr) | ||
title: Name of the person | ||
- | ||
text: Text of the testimonial 2 | ||
title: Name of the person | ||
- | ||
text: Text of the testimonial 3 | ||
title: Name of the person |
10 changes: 10 additions & 0 deletions
10
exampleSite/data/fr/localized_testimonials_no_fallback.yml
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,10 @@ | ||
items: | ||
- | ||
text: Text of the testimonial 1(localized no fallback, fr) | ||
title: Name of the person | ||
- | ||
text: Text of the testimonial 2 | ||
title: Name of the person | ||
- | ||
text: Text of the testimonial 3 | ||
title: Name of the person |
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,10 @@ | ||
items: | ||
- | ||
text: Text of the testimonial 1 (localized backup, no lang) | ||
title: Name of the person | ||
- | ||
text: Text of the testimonial 2 | ||
title: Name of the person | ||
- | ||
text: Text of the testimonial 3 | ||
title: Name of the person |
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