Skip to content

Commit

Permalink
Fix indentation and broken image
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring authored Aug 6, 2023
1 parent 48ad412 commit 8dbe5df
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 63 deletions.
18 changes: 9 additions & 9 deletions content/en/content-management/summaries.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,19 @@ You can show content summaries with the following code. You could use the follow

{{< code file="page-list-with-summaries.html" >}}
{{ range first 10 .Pages }}
<article>
<!-- this <div> includes the title summary -->
<div>
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ .Summary }}
</div>
{{ if .Truncated }}
<article>
<!-- this <div> includes the title summary -->
<div>
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ .Summary }}
</div>
{{ if .Truncated }}
<!-- This <div> includes a read more link, but only if the summary is truncated... -->
<div>
<a href="{{ .RelPermalink }}">Read More…</a>
</div>
{{ end }}
</article>
{{ end }}
</article>
{{ end }}
{{< /code >}}

Expand Down
12 changes: 6 additions & 6 deletions content/en/content-management/toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,17 @@ The following is an example of a very basic [single page template]:

{{< code file="layout/_default/single.html" >}}
{{ define "main" }}
<main>
<main>
<article>
<header>
<header>
<h1>{{ .Title }}</h1>
</header>
{{ .Content }}
</header>
{{ .Content }}
</article>
<aside>
{{ .TableOfContents }}
{{ .TableOfContents }}
</aside>
</main>
</main>
{{ end }}
{{< /code >}}

Expand Down
14 changes: 7 additions & 7 deletions content/en/functions/transform.Unmarshal.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ The following example lists the items of an RSS feed:

```go-html-template
{{ with resources.GetRemote "https://example.com/rss.xml" | transform.Unmarshal }}
{{ range .channel.item }}
<strong>{{ .title | plainify | htmlUnescape }}</strong><br />
<p>{{ .description | plainify | htmlUnescape }}</p>
{{ $link := .link | plainify | htmlUnescape }}
<a href="{{ $link }}">{{ $link }}</a><br />
<hr>
{{ end }}
{{ range .channel.item }}
<strong>{{ .title | plainify | htmlUnescape }}</strong><br>
<p>{{ .description | plainify | htmlUnescape }}</p>
{{ $link := .link | plainify | htmlUnescape }}
<a href="{{ $link }}">{{ $link }}</a><br>
<hr>
{{ end }}
{{ end }}
```
24 changes: 12 additions & 12 deletions content/en/functions/urlize.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ The following might be used as a partial within a [single page template][singlet

{{< code file="layouts/partials/content-header.html" >}}
<header>
<h1>{{ .Title }}</h1>
{{ with .Params.location }}
<div><a href="/locations/{{ . | urlize }}">{{ . }}</a></div>
{{ end }}
<!-- Creates a list of tags for the content and links to each of their pages -->
{{ with .Params.tags }}
<h1>{{ .Title }}</h1>
{{ with .Params.location }}
<div><a href="/locations/{{ . | urlize }}">{{ . }}</a></div>
{{ end }}
<!-- Creates a list of tags for the content and links to each of their pages -->
{{ with .Params.tags }}
<ul>
{{ range .}}
<li>
<a href="/tags/{{ . | urlize }}">{{ . }}</a>
</li>
{{ end }}
{{ range .}}
<li>
<a href="/tags/{{ . | urlize }}">{{ . }}</a>
</li>
{{ end }}
</ul>
{{ end }}
{{ end }}
</header>
{{< /code >}}

Expand Down
2 changes: 0 additions & 2 deletions content/en/news/0.25-relnotes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ aliases: [/0-25/]

Hugo `0.25` is the **Kinder Surprise**: It automatically opens the page you&#39;re working on in the browser, it adds full `AND` and `OR` support in page queries, and you can now have templates per language.

![Hugo Open on Save](https://cdn-standard5.discourse.org/uploads/gohugo/optimized/2X/6/622088d4a8eacaf62bbbaa27dab19d789e10fe09_1_690x345.gif "Hugo Open on Save")

If you start with `hugo server --navigateToChanged`, Hugo will navigate to the relevant page on save (see animated GIF). This is extremely useful for site-wide edits. Another very useful feature in this version is the added support for `AND` (`intersect`) and `OR` (`union`) filters when combined with `where`.

Example:
Expand Down
4 changes: 2 additions & 2 deletions content/en/templates/homepage.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The following is an example of a homepage template that uses [partial][partials]
<header class="homepage-header">
<h1>{{ .Title }}</h1>
{{ with .Params.subtitle }}
<span class="subtitle">{{ . }}</span>
<span class="subtitle">{{ . }}</span>
{{ end }}
</header>
<div class="homepage-content">
Expand All @@ -49,7 +49,7 @@ The following is an example of a homepage template that uses [partial][partials]
</div>
<div>
{{ range first 10 .Site.RegularPages }}
{{ .Render "summary" }}
{{ .Render "summary" }}
{{ end }}
</div>
</main>
Expand Down
20 changes: 10 additions & 10 deletions content/en/templates/lists/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,13 @@ This list template has been modified slightly from a template originally used in
{{ partial "subheader.html" . }}
<main>
<div>
<h1>{{ .Title }}</h1>
<ul>
<!-- Renders the li.html content view for each content/posts/*.md -->
{{ range .Pages }}
{{ .Render "li" }}
{{ end }}
</ul>
<h1>{{ .Title }}</h1>
<ul>
<!-- Renders the li.html content view for each content/posts/*.md -->
{{ range .Pages }}
{{ .Render "li" }}
{{ end }}
</ul>
</div>
</main>
{{ partial "footer.html" . }}
Expand All @@ -184,10 +184,10 @@ This list template has been modified slightly from a template originally used in
{{ define "main" }}
<main>
<div>
<h1>{{ .Title }}</h1>
<!-- ranges through each of the content files associated with a particular taxonomy term and renders the summary.html content view -->
<h1>{{ .Title }}</h1>
<!-- ranges through each of the content files associated with a particular taxonomy term and renders the summary.html content view -->
{{ range .Pages }}
{{ .Render "summary" }}
{{ .Render "summary" }}
{{ end }}
</div>
</main>
Expand Down
22 changes: 11 additions & 11 deletions content/en/templates/section-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ Examples:
{{< code file="layouts/_default/section.html" >}}
{{ define "main" }}
<main>
{{ .Content }}
<ul class="contents">
{{ range .Paginator.Pages }}
<li>{{ .Title }}
<div>
{{ partial "summary.html" . }}
</div>
</li>
{{ end }}
</ul>
{{ partial "pagination.html" . }}
{{ .Content }}
<ul class="contents">
{{ range .Paginator.Pages }}
<li>{{ .Title }}
<div>
{{ partial "summary.html" . }}
</div>
</li>
{{ end }}
</ul>
{{ partial "pagination.html" . }}
</main>
{{ end }}
{{< /code >}}
Expand Down
8 changes: 4 additions & 4 deletions content/en/templates/single-page-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ This single page template makes use of Hugo [base templates], the [`.Format` fun
</section>
<aside id="meta">
<div>
<section>
<h4 id="date"> {{ .Date.Format "Mon Jan 2, 2006" }} </h4>
<h5 id="wordcount"> {{ .WordCount }} Words </h5>
</section>
<section>
<h4 id="date"> {{ .Date.Format "Mon Jan 2, 2006" }} </h4>
<h5 id="wordcount"> {{ .WordCount }} Words </h5>
</section>
{{ with .GetTerms "topics" }}
<ul id="topics">
{{ range . }}
Expand Down

0 comments on commit 8dbe5df

Please sign in to comment.