Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictoria Drake <hello@victoria.dev>2020-05-31 21:12:41 +0300
committerVictoria Drake <hello@victoria.dev>2020-05-31 21:12:41 +0300
commit2263cdb0fa5664393f192d872c1d1f6196c6d684 (patch)
treeedb78fbaadf55b1c6bff6e0d8bdf8846dd9cde11 /layouts
parent9b8389c380355f00c6b838bd12b86b972093f9f0 (diff)
Markdownify post titlesv4.1.0
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/baseof.html2
-rw-r--r--layouts/_default/list.html4
-rw-r--r--layouts/_default/taxonomy.html6
-rw-r--r--layouts/blog/list.html2
-rw-r--r--layouts/blog/single.html104
-rw-r--r--layouts/index.html6
-rw-r--r--layouts/partials/blog/li.html2
-rw-r--r--layouts/partials/head/metadata.html2
-rw-r--r--layouts/partials/head/openGraph.html4
-rw-r--r--layouts/partials/home/blog.html2
-rw-r--r--layouts/partials/home/projects.html4
-rw-r--r--layouts/partials/nav.html8
-rw-r--r--layouts/projects/list.html2
13 files changed, 74 insertions, 74 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index a366802..e08ad7d 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -16,7 +16,7 @@
<!-- Begin Title -->
<div class="container hero {{ if .Site.Params.fadeIn | default true }} fade-in one {{ end }}">
{{ block "title" . }}
- <h1 class="bold-title is-1">{{ .Title }}</h1>
+ <h1 class="bold-title is-1">{{ .Title | markdownify }}</h1>
{{ end }}
</div>
<!-- End Title -->
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index fe79f8b..5941551 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -7,11 +7,11 @@
{{ range .Pages.ByPublishDate.Reverse }}
{{ if .Date }}
<li>
- <a href="{{ .Permalink }}">{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} | {{ .Title }}</a>
+ <a href="{{ .Permalink }}">{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} | {{ .Title | markdownify }}</a>
</li>
{{ else }}
<li>
- <a href="{{ .Permalink }}">{{ .Title }}</a>
+ <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</li>
{{ end }}
{{ end }}
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html
index 71d0ca3..21511de 100644
--- a/layouts/_default/taxonomy.html
+++ b/layouts/_default/taxonomy.html
@@ -1,5 +1,5 @@
{{ define "title" }}
- <h1 class="bold-title is-1">{{ .Data.Singular | humanize }}: {{ lower .Title }}</h1>
+ <h1 class="bold-title is-1">{{ .Data.Singular | humanize }}: {{ lower .Title | markdownify }}</h1>
{{ end }}
{{ define "main" }}
@@ -8,11 +8,11 @@
{{ range .Pages.ByPublishDate.Reverse }}
{{ if .Date }}
<li>
- <a href="{{ .Permalink }}">{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} | {{ .Title }}</a>
+ <a href="{{ .Permalink }}">{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} | {{ .Title | markdownify }}</a>
</li>
{{ else }}
<li>
- <a href="{{ .Permalink }}">{{ .Title }}</a>
+ <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</li>
{{ end }}
{{ end }}
diff --git a/layouts/blog/list.html b/layouts/blog/list.html
index 775277b..95085c5 100644
--- a/layouts/blog/list.html
+++ b/layouts/blog/list.html
@@ -9,7 +9,7 @@
<div class="summary">{{ if .Params.date }}{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}{{ end }}
<h3 class="title is-3 strong-post-title">
<a href="{{ .Permalink }}">
- {{ .Title }}
+ {{ .Title | markdownify }}
</a>
</h3>
<div class="markdown">
diff --git a/layouts/blog/single.html b/layouts/blog/single.html
index 6a7f5b3..f5fadb7 100644
--- a/layouts/blog/single.html
+++ b/layouts/blog/single.html
@@ -1,61 +1,61 @@
{{ define "title" }}
{{ with .Site.GetPage "/blog" }}
- <h1 class="bold-title is-1">{{ .Title }}</h1>
+<h1 class="bold-title is-1">{{ .Title | markdownify }}</h1>
{{ end }}
{{ end }}
{{ define "main" }}
- <div class="container">
- <h2 class="title is-1 top-pad strong-post-title">
- <a href="{{ .Permalink }}">{{ .Title }}</a>
- </h2>
- <div class="post-data">
- {{ if .Params.date }}{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} |{{ end }}
- {{ i18n "blog_readingTime" .ReadingTime }}
- </div>
- {{ if or .Site.Params.share.twitter .Site.Params.share.facebook .Site.Params.share.pinterest .Site.Params.share.googlePlus }}
- <div class="blog-share">
- {{ i18n "blog_shareThis" . }}:
- {{ if .Site.Params.share.twitter }}
- <a class="twitter-share-button" href="https://twitter.com/intent/tweet?text={{ .Title }}%20{{ .Permalink }}" onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
- <i class="fab fa-twitter"></i>
- <span class="hidden">Twitter</span>
- </a>
- {{ end }}
- {{ if .Site.Params.share.facebook }}
- <a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
- <i class="fab fa-facebook-f"></i>
- <span class="hidden">Facebook</span>
- </a>
- {{ end }}
- {{ if .Site.Params.share.pinterest }}
- <a class="icon-pinterest" href="http://pinterest.com/pin/create/button/?url={{ .Permalink }}{{ if .Params.pinterestMedia }}&amp;media={{ .Site.BaseURL }}{{ .Params.pinterestMedia }}{{ end }}&amp;description={{ .Title | safeHTML}}" onclick="window.open(this.href, 'pinterest-share','width=580,height=296');return false;">
- <i class="fab fa-pinterest-p"></i>
- <span class="hidden">Pinterest</span>
- </a>
- {{ end }}
- {{ if .Site.Params.share.googlePlus }}
- <a class="icon-google-plus" href="https://plus.google.com/share?url={{ .Permalink }}" onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
- <i class="fab fa-google-plus-g"></i>
- <span class="hidden">Google+</span>
- </a>
- {{ end }}
- </div>
+<div class="container">
+ <h2 class="title is-1 top-pad strong-post-title">
+ <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
+ </h2>
+ <div class="post-data">
+ {{ if .Params.date }}{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} |{{ end }}
+ {{ i18n "blog_readingTime" .ReadingTime }}
+ </div>
+ {{ if or .Site.Params.share.twitter .Site.Params.share.facebook .Site.Params.share.pinterest .Site.Params.share.googlePlus }}
+ <div class="blog-share">
+ {{ i18n "blog_shareThis" . }}:
+ {{ if .Site.Params.share.twitter }}
+ <a class="twitter-share-button" href="https://twitter.com/intent/tweet?text={{ .Title | markdownify }}%20{{ .Permalink }}" onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
+ <i class="fab fa-twitter"></i>
+ <span class="hidden">Twitter</span>
+ </a>
{{ end }}
- {{ if .Params.tags }}
- {{ $len := (len .Params.tags) }}
- <p>
- Tag{{ if gt $len 1 }}s{{ end }}:
- {{ range $index, $tag := .Params.tags }}
- <a href="{{ "tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>{{ if ne (add $index 1) $len }},{{ end }}
- {{ end }}
- </p>
+ {{ if .Site.Params.share.facebook }}
+ <a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
+ <i class="fab fa-facebook-f"></i>
+ <span class="hidden">Facebook</span>
+ </a>
+ {{ end }}
+ {{ if .Site.Params.share.pinterest }}
+ <a class="icon-pinterest" href="http://pinterest.com/pin/create/button/?url={{ .Permalink }}{{ if .Params.pinterestMedia }}&amp;media={{ .Site.BaseURL }}{{ .Params.pinterestMedia }}{{ end }}&amp;description={{ .Title | safeHTML}}" onclick="window.open(this.href, 'pinterest-share','width=580,height=296');return false;">
+ <i class="fab fa-pinterest-p"></i>
+ <span class="hidden">Pinterest</span>
+ </a>
+ {{ end }}
+ {{ if .Site.Params.share.googlePlus }}
+ <a class="icon-google-plus" href="https://plus.google.com/share?url={{ .Permalink }}" onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
+ <i class="fab fa-google-plus-g"></i>
+ <span class="hidden">Google+</span>
+ </a>
{{ end }}
</div>
- <!-- Begin blog post content -->
- <div class="container markdown top-pad">
- {{ .Content }}
- </div>
- <!-- End blog post content -->
- {{ partial "comments.html" . }}
-{{ end }}
+ {{ end }}
+ {{ if .Params.tags }}
+ {{ $len := (len .Params.tags) }}
+ <p>
+ Tag{{ if gt $len 1 }}s{{ end }}:
+ {{ range $index, $tag := .Params.tags }}
+ <a href="{{ "tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>{{ if ne (add $index 1) $len }},{{ end }}
+ {{ end }}
+ </p>
+ {{ end }}
+</div>
+<!-- Begin blog post content -->
+<div class="container markdown top-pad">
+ {{ .Content }}
+</div>
+<!-- End blog post content -->
+{{ partial "comments.html" . }}
+{{ end }} \ No newline at end of file
diff --git a/layouts/index.html b/layouts/index.html
index 209ba78..fd1787c 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -20,7 +20,7 @@
<div class="container has-text-centered">
<!-- Title and tagline -->
<h1 class="bold-title {{ if or (.Site.Params.fadeIn | default true) .Site.Params.fadeInIndex }}fade-in one{{ end }}">
- {{ .Title }}
+ {{ .Title | markdownify }}
</h1>
<div class="subtitle is-3 {{ if or (.Site.Params.fadeIn | default true) .Site.Params.fadeInIndex }}fade-in two{{ end }}">
{{ .Content }}
@@ -67,7 +67,7 @@
<!-- Range through all sections in /home execept contact.md -->
<div class="section" id="{{ .File.TranslationBaseName }}">
<div class="container">
- <h2 class="title is-2 has-text-centered">{{ .Title }}</h2>
+ <h2 class="title is-2 has-text-centered">{{ .Title | markdownify }}</h2>
{{ if .Params.Image }}
<div class="columns">
<div class="column is-one-third has-text-centered">
@@ -101,7 +101,7 @@
{{ with .Resources.GetMatch "contact.md" }}
<div class="section" id="{{ .File.TranslationBaseName }}">
<div class="container has-text-centered">
- <h2 class="title is-2">{{ .Title }}</h2>
+ <h2 class="title is-2">{{ .Title | markdownify }}</h2>
<div class="markdown">
{{ .Content }}
</div>
diff --git a/layouts/partials/blog/li.html b/layouts/partials/blog/li.html
index db6359b..e72f1cd 100644
--- a/layouts/partials/blog/li.html
+++ b/layouts/partials/blog/li.html
@@ -1,5 +1,5 @@
{{ range .Pages.ByPublishDate.Reverse }}
<li class="post-item">
- <span><a href="{{ .Permalink }}">{{ .Title }}</a></span>{{ if .Params.date }} - <span>{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}</span>{{ end }}
+ <span><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></span>{{ if .Params.date }} - <span>{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}</span>{{ end }}
</li>
{{ end }}
diff --git a/layouts/partials/head/metadata.html b/layouts/partials/head/metadata.html
index ab1aded..7481c1c 100644
--- a/layouts/partials/head/metadata.html
+++ b/layouts/partials/head/metadata.html
@@ -6,7 +6,7 @@
<meta name="referrer" content="no-referrer">
{{ if .Site.Params.description }}<meta name="description" content="{{ .Site.Params.description }}">{{ end }}
<title>
-{{ .Title }}{{ if ne .Title .Site.Title }} - {{ .Site.Title }}{{ end }}
+{{ .Title | markdownify }}{{ if ne .Title .Site.Title }} - {{ .Site.Title | markdownify }}{{ end }}
</title>
<!-- RSS -->
{{ with .OutputFormats.Get "RSS" }}<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />{{ end }}
diff --git a/layouts/partials/head/openGraph.html b/layouts/partials/head/openGraph.html
index d613451..ca043b3 100644
--- a/layouts/partials/head/openGraph.html
+++ b/layouts/partials/head/openGraph.html
@@ -1,8 +1,8 @@
-<meta property="og:title" content="{{ .Title }}{{ if ne .Title .Site.Title }} - {{ .Site.Title }}{{ end }}" />
+<meta property="og:title" content="{{ .Title | markdownify }}{{ if ne .Title .Site.Title }} - {{ .Site.Title | markdownify }}{{ end }}" />
<meta property="og:type" content="website" />
<meta property="og:description" content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Site.Params.description }}{{ end }}"/>
<meta property="og:url" content="{{ .Permalink }}"/>
-<meta property="og:site_name" content="{{ .Site.Title }}"/>
+<meta property="og:site_name" content="{{ .Site.Title | markdownify }}"/>
{{ with .Resources.ByType "image" }}
{{ range first 5 (sort . "Params.weight") }}
diff --git a/layouts/partials/home/blog.html b/layouts/partials/home/blog.html
index 2c2b55b..0582a20 100644
--- a/layouts/partials/home/blog.html
+++ b/layouts/partials/home/blog.html
@@ -6,7 +6,7 @@
<h2 class="title is-2 has-text-centered">{{ i18n "index_blog_latestPosts" . }}</h2>
{{ range first 1 .Pages.ByPublishDate.Reverse }}
<div class="summary">{{ if .Params.date }}{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}{{ end }}
- <h3 class="title is-3 latest-post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
+ <h3 class="title is-3 latest-post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h3>
<div class="markdown">
{{ .Summary }}
{{ if .Truncated }}
diff --git a/layouts/partials/home/projects.html b/layouts/partials/home/projects.html
index e5a28a8..0cf6d96 100644
--- a/layouts/partials/home/projects.html
+++ b/layouts/partials/home/projects.html
@@ -3,7 +3,7 @@
<!-- Begin Projects container -->
<div class="container">
<h2 class="title is-2 has-text-centered">
- {{ .Title }}
+ {{ .Title | markdownify }}
</h2>
<div class="section">
<div class="columns is-multiline">
@@ -32,7 +32,7 @@
</div>
<div class="card-content has-text-centered top-pad">
<a {{ if .Params.external_link }} href="{{ .Params.external_link }}" {{ end }}>
- {{ .Title }}
+ {{ .Title | markdownify }}
</a>
</div>
</div>
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
index 9f8c722..ec6cf57 100644
--- a/layouts/partials/nav.html
+++ b/layouts/partials/nav.html
@@ -56,7 +56,7 @@
{{ if eq (os.Stat .File.Dir).Name "projects" }}
<!-- Now for some cool projects -->
{{ if $isHome }}
- <a class="navbar-item" href="{{ printf "#%s" ( .Title | urlize) | relLangURL }}">{{ .Title }}</a>
+ <a class="navbar-item" href="{{ printf "#%s" ( .Title | urlize) | relLangURL }}">{{ .Title | markdownify }}</a>
{{ else }}
{{ $pageIsInProjects := eq $.Page.Section "project"}}
{{ if not (and $pageIsInProjects (eq $.Page.Kind "section")) }}
@@ -72,7 +72,7 @@
{{ else if eq (os.Stat .File.Dir).Name "blog" }}
<!-- Let`s show some blog posts -->
{{ if $isHome }}
- <a class="navbar-item" href="{{ printf "#%s" ( .Title | urlize) | relLangURL }}">{{ .Title }}</a>
+ <a class="navbar-item" href="{{ printf "#%s" ( .Title | urlize) | relLangURL }}">{{ .Title | markdownify }}</a>
{{ else }}
{{ $pageIsInBlog := eq $.Page.Section "blog"}}
{{ if not (and $pageIsInBlog (eq $.Page.Kind "section")) }}
@@ -86,7 +86,7 @@
{{ end }}
{{ end }}
{{ else }}
- <a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "#%s" (.File.TranslationBaseName | urlize) | relLangURL }}{{ end }}">{{ .Title }}</a>
+ <a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "#%s" (.File.TranslationBaseName | urlize) | relLangURL }}{{ end }}">{{ .Title | markdownify }}</a>
{{ end }}
{{ end }}
{{ end }}
@@ -94,7 +94,7 @@
{{ with .Site.GetPage "/home" }}
{{ with .Resources.GetMatch "contact.md" }}
- <a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "#%s" (.File.TranslationBaseName | urlize) | relLangURL }}{{ end }}">{{ .Title }}</a>
+ <a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "#%s" (.File.TranslationBaseName | urlize) | relLangURL }}{{ end }}">{{ .Title | markdownify }}</a>
{{ end }}
{{ end }}
diff --git a/layouts/projects/list.html b/layouts/projects/list.html
index 37480ea..2180025 100644
--- a/layouts/projects/list.html
+++ b/layouts/projects/list.html
@@ -29,7 +29,7 @@
</div>
<div class="card-content has-text-centered top-pad">
<a href="{{ if .Params.external_link }}{{ .Params.external_link }}{{ else }}{{ .Permalink }}{{ end }}">
- {{ .Title }}
+ {{ .Title | markdownify }}
</a>
</div>
</div>