mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-10 11:04:49 -04:00
docs(transform.Unmarshal): match lang attribute to title language in examples
This commit is contained in:
parent
1985886bd9
commit
bda544ccee
@ -230,7 +230,7 @@ Let's add a `lang` attribute to the `title` nodes of our RSS feed, and a namespa
|
|||||||
<language>en-US</language>
|
<language>en-US</language>
|
||||||
<atom:link href="https://example.org/books/index.xml" rel="self" type="application/rss+xml" />
|
<atom:link href="https://example.org/books/index.xml" rel="self" type="application/rss+xml" />
|
||||||
<item>
|
<item>
|
||||||
<title lang="fr">The Hunchback of Notre Dame</title>
|
<title lang="en">The Hunchback of Notre Dame</title>
|
||||||
<description>Written by Victor Hugo</description>
|
<description>Written by Victor Hugo</description>
|
||||||
<isbn:number>9780140443530</isbn:number>
|
<isbn:number>9780140443530</isbn:number>
|
||||||
<link>https://example.org/books/the-hunchback-of-notre-dame/</link>
|
<link>https://example.org/books/the-hunchback-of-notre-dame/</link>
|
||||||
@ -238,7 +238,7 @@ Let's add a `lang` attribute to the `title` nodes of our RSS feed, and a namespa
|
|||||||
<guid>https://example.org/books/the-hunchback-of-notre-dame/</guid>
|
<guid>https://example.org/books/the-hunchback-of-notre-dame/</guid>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<title lang="en">Les Misérables</title>
|
<title lang="fr">Les Misérables</title>
|
||||||
<description>Written by Victor Hugo</description>
|
<description>Written by Victor Hugo</description>
|
||||||
<isbn:number>9780451419439</isbn:number>
|
<isbn:number>9780451419439</isbn:number>
|
||||||
<link>https://example.org/books/les-miserables/</link>
|
<link>https://example.org/books/les-miserables/</link>
|
||||||
@ -266,7 +266,7 @@ Each item node looks like this:
|
|||||||
"pubDate": "Mon, 09 Oct 2023 09:27:12 -0700",
|
"pubDate": "Mon, 09 Oct 2023 09:27:12 -0700",
|
||||||
"title": {
|
"title": {
|
||||||
"#text": "The Hunchback of Notre Dame",
|
"#text": "The Hunchback of Notre Dame",
|
||||||
"-lang": "fr"
|
"-lang": "en"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -290,8 +290,8 @@ Hugo renders this to:
|
|||||||
|
|
||||||
```html
|
```html
|
||||||
<ul>
|
<ul>
|
||||||
<li>The Hunchback of Notre Dame (fr) 9780140443530</li>
|
<li>The Hunchback of Notre Dame (en) 9780140443530</li>
|
||||||
<li>Les Misérables (en) 9780451419439</li>
|
<li>Les Misérables (fr) 9780451419439</li>
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user