Skip to content

Commit

Permalink
Merge pull request #745 from ivpn/task/update-hugo
Browse files Browse the repository at this point in the history
Update Hugo and nodeJS
  • Loading branch information
nathanrod authored Apr 29, 2024
2 parents e86075f + bdce62a commit e09dfe6
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 30 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ WORKDIR /opt/build
# Install nodejs, yarn and hugo
RUN apt-get update \
&& apt-get install -y gnupg gnupg2 gnupg1 \
&& curl -sL https://deb.nodesource.com/setup_15.x | bash - \
&& curl -sL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get install -y nodejs \
&& apt-get update \
&& npm install --global yarn \
&& curl -L https://github.com/gohugoio/hugo/releases/download/v0.76.3/hugo_0.76.3_Linux-64bit.deb -o /tmp/hugo.deb \
&& curl -L https://github.com/gohugoio/hugo/releases/download/v0.125.3/hugo_0.125.3_linux-amd64.deb -o /tmp/hugo.deb \
&& dpkg -i /tmp/hugo.deb \
&& rm /tmp/hugo.deb

Expand Down
9 changes: 8 additions & 1 deletion src/config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ title = "IVPN"
theme = "ivpn-v3"
paginate = 8
summaryLength = 35
disableKinds = ["sitemap", "taxonomyTerm"]
disableKinds = ["sitemap", "taxonomy"]

pygmentsUseClasses=true
pygmentsCodefencesGuessSyntax=true
pygmentsCodefences=true
pygmentsStyle="monokai"
pygmentsOptions="noclasses=false"


[markup.goldmark.renderer]
unsafe= true
Expand Down
4 changes: 4 additions & 0 deletions src/themes/ivpn-v3/assets/scss/components/highlight.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
pre code span {
display: inline;
}

pre code .cl{
color: #b35a5a !important;
}
}

.bold {
Expand Down
20 changes: 10 additions & 10 deletions src/themes/ivpn-v3/layouts/blog/single.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{{ define "main" }}
<section class="blog-article">
<div class="breadcrumb">
<a href="/blog/">IVPN Blog</a><span class="breadcrumb-seperator">></span>{{ range .Params.categories }}{{ with ($.Site.GetPage (printf "/categories/%s" (. | urlize))) }}<a href="{{ .URL }}">{{ .Title }}</a>{{ end }}{{ end }}<span class="breadcrumb-seperator">></span>{{ .Title }}
<a href="/blog/">IVPN Blog</a><span class="breadcrumb-seperator">></span>{{ range .Params.categories }}{{ with ($.Site.GetPage (printf "/categories/%s" (. | urlize))) }}<a href="{{ .Permalink }}">{{ .Title }}</a>{{ end }}{{ end }}<span class="breadcrumb-seperator">></span>{{ .Title }}
</div>
<div class="blog-article__heading">
<h1>{{ .Title }}</h1>
<p>
{{ range .Params.categories }}
{{ with ($.Site.GetPage (printf "/categories/%s" (. | urlize))) }}
<a href="{{ .URL }}" class="badge">{{ .Title }}</a>
<a href="{{ .Permalink }}" class="badge">{{ .Title }}</a>
{{ end }}
{{ end }}
{{ range .Params.authors }}
{{ with ($.Site.GetPage (printf "/authors/%s" (. | urlize))) }}
By <a href="{{ .URL }}">{{ .Title }}</a> |
By <a href="{{ .Permalink }}">{{ .Title }}</a> |
{{ end }}
{{ end }}
Posted on {{ .Date.Format "January 2, 2006"}}
Expand Down Expand Up @@ -68,14 +68,14 @@ <h3>{{ len .Params.comments }} Comments</h3>
<div class="blog-article__highlighted">
{{ range .Params.categories }}
{{ with ($.Site.GetPage (printf "/categories/%s" (. | urlize))) }}
<a href="{{ .URL }}" class="badge">{{ .Title }}</a>
<a href="{{ .Permalink }}" class="badge">{{ .Title }}</a>
{{ end }}
{{ end }}
<h4><a href="{{ .Page.URL }}">{{ .Page.Title }}</a></h4>
<h4><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a></h4>
<p class="blog-article__highlighted-meta">
{{ range .Params.authors }}
{{ with ($.Site.GetPage (printf "/authors/%s" (. | urlize))) }}
By <a href="{{ .URL }}">{{ .Title }}</a>
By <a href="{{ .Permalink }}">{{ .Title }}</a>
{{ end }}
{{ end }}
</p>
Expand All @@ -93,22 +93,22 @@ <h4><a href="{{ .Page.URL }}">{{ .Page.Title }}</a></h4>
<div class="blog-article__related">
<div class="blog-article__related-image">
{{ if .Params.thumbnailImage }}
<a href="{{ .Page.URL }}">
<a href="{{ .Page.Permalink }}">
<img src="{{ site.Params.cdnUrl }}{{ .Params.thumbnailImage }}" alt="{{ .Title }}">
</a>
{{ end }}
{{ range .Params.categories }}
{{ with ($.Site.GetPage (printf "/categories/%s" (. | urlize))) }}
<a href="{{ .URL }}" class="badge">{{ .Title }}</a>
<a href="{{ .Permalink }}" class="badge">{{ .Title }}</a>
{{ end }}
{{ end }}
</div>
<h4><a href="{{ .Page.URL }}">{{ .Page.Title }}</a></h4>
<h4><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a></h4>
<p class="blog-article__related-meta">
Posted on {{ .Date.Format "January 2, 2006"}} by
{{ range .Params.authors }}
{{ with ($.Site.GetPage (printf "/authors/%s" (. | urlize))) }}
<a href="{{ .URL }}">{{ .Title }}</a>
<a href="{{ .Permalink }}">{{ .Title }}</a>
{{ end }}
{{ end }}
</p>
Expand Down
6 changes: 3 additions & 3 deletions src/themes/ivpn-v3/layouts/pages/guides.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<h2>Get started</h2>
<section class="guides">
{{ range where .Pages "Params.section" "Basic" }}
<a href="{{ .URL }}">
<a href="{{ .Permalink }}">
<span>{{ .Title }}</span>
<em>Read more</em>
</a>
Expand All @@ -14,7 +14,7 @@ <h2>Get started</h2>
<h2>Advanced Privacy and Anonymity</h2>
<section class="guides">
{{ range where .Pages "Params.section" "Advanced" }}
<a href="{{ .URL }}">
<a href="{{ .Permalink }}">
<span>{{ .Title }}</span>
<em>Read more</em>
</a>
Expand All @@ -23,7 +23,7 @@ <h2>Advanced Privacy and Anonymity</h2>
<h2>Misc</h2>
<section class="guides">
{{ range where .Pages "Params.section" "Misc" }}
<a href="{{ .URL }}">
<a href="{{ .Permalink }}">
<span>{{ .Title }}</span>
<em>Read more</em>
</a>
Expand Down
2 changes: 1 addition & 1 deletion src/themes/ivpn-v3/layouts/pages/help-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h3>Related Articles</h3>
{{ if isset .Params "h1" }}
{{ if not (in .Params.h1 $pageH1) }}
<li>
<a href="{{ .URL }}">{{ .Params.h1 }}</a>
<a href="{{ .Permalink }}">{{ .Params.h1 }}</a>
</li>
{{ end }}
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion src/themes/ivpn-v3/layouts/pages/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h1>Help Center</h1>
<ul class="list">
{{ range where .Site.Pages ".Params.sections" "intersect" (slice .Params.section) }}
<li>
<a href="{{ .URL }}">{{ .Params.h1 }}</a>
<a href="{{ .Permalink }}">{{ .Params.h1 }}</a>
</li>
{{ end }}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion src/themes/ivpn-v3/layouts/pages/setup-article.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h1>{{ .Params.section }}</h1>
<nav id="nav">
{{ $listItem := .Params.listItem }}
{{ range .Parent.Pages }}
<a class="{{ if eq .Params.listItem $listItem }}active{{ end }}" href="{{ .URL }}">{{ .Params.listItem }}</a>
<a class="{{ if eq .Params.listItem $listItem }}active{{ end }}" href="{{ .Permalink }}">{{ .Params.listItem }}</a>
{{ end }}
</nav>
<main id="main">
Expand Down
2 changes: 1 addition & 1 deletion src/themes/ivpn-v3/layouts/pages/setup-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h1>{{ .Params.section }}</h1>
<div class="listing">
<nav id="nav">
{{ range .Pages }}
<a href="{{ .URL }}">{{ .Params.listItem }}</a>
<a href="{{ .Permalink }}">{{ .Params.listItem }}</a>
{{ end }}
</nav>
<main id="main">
Expand Down
10 changes: 5 additions & 5 deletions src/themes/ivpn-v3/layouts/partials/blog-article.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<article class="article">
<a href="{{ .Page.URL }}" class="article__image {{ if eq .Params.thumbnailImage nil }}article__image--placeholder{{ end }}">
<a href="{{ .Page.Permalink }}" class="article__image {{ if eq .Params.thumbnailImage nil }}article__image--placeholder{{ end }}">
{{ if .Params.thumbnailImage }}
<img src="{{ site.Params.cdnUrl }}{{ .Params.thumbnailImage }}" class="img-fluid" alt="{{ .Page.Title }}"/>
{{ else }}
Expand All @@ -9,20 +9,20 @@
<div class="article__summary">
{{ range .Params.categories }}
{{ with ($.Site.GetPage (printf "/categories/%s" (. | urlize))) }}
<a href="{{ .URL }}" class="badge">{{ .Title }}</a>
<a href="{{ .Permalink }}" class="badge">{{ .Title }}</a>
{{ end }}
{{ end }}
<h3><a href="{{ .Page.URL }}">{{ .Page.Title }}</a></h3>
<h3><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a></h3>
<p class="article-meta">
{{ range .Params.authors }}
{{ with ($.Site.GetPage (printf "/authors/%s" (. | urlize))) }}
By <a href="{{ .URL }}">{{ .Title }}</a> |
By <a href="{{ .Permalink }}">{{ .Title }}</a> |
{{ end }}
{{ end }}
Posted on {{ .Page.Date.Format "January 2, 2006"}}
</p>

<p class="article-summary">{{ .Page.Summary | safeHTML }}</p>
<a class="article-continue" href="{{ .Page.URL }}">Continue reading</a>
<a class="article-continue" href="{{ .Page.Permalink }}">Continue reading</a>
</div>
</article>
2 changes: 1 addition & 1 deletion src/themes/ivpn-v3/layouts/partials/blog-categories.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<section class="blog__categories">
{{ range sort .Site.Taxonomies.categories ".Page.Weight" "asc" }}
<div class="blog__category">
<a href="{{ .Page.URL }}">
<a href="{{ .Page.Permalink }}">
<span class="title">{{ .Page.Title }}</span>
<span class="sub-title">({{ .Count }} {{ if eq .Count 1 }}article{{ else }}articles{{ end }})</span>
</a>
Expand Down
8 changes: 4 additions & 4 deletions src/themes/ivpn-v3/layouts/partials/blog-side-bar.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div>
<p class="sidebar-header">Tags</p>
{{ range .Site.Taxonomies.tags }}
<a href="{{ .Page.URL }}" rel="noindex, dofollow" class="tag">{{ .Page.Title }}</a>
<a href="{{ .Page.Permalink }}" rel="noindex, dofollow" class="tag">{{ .Page.Title }}</a>
{{ end }}
</div>
<div class="blog__highlighted">
Expand All @@ -10,14 +10,14 @@
<div class="blog__highlighted-article blog__highlighted-article--border-top">
{{ range .Params.categories }}
{{ with ($.Site.GetPage (printf "/categories/%s" (. | urlize))) }}
<a href="{{ .URL }}" class="badge steel-badge">{{ .Title }}</a>
<a href="{{ .Permalink }}" class="badge steel-badge">{{ .Title }}</a>
{{ end }}
{{ end }}
<h4><a href="{{ .Page.URL }}">{{ .Page.Title }}</a></h4>
<h4><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a></h4>
<p class="blog__highlighted-meta">
{{ range .Params.authors }}
{{ with ($.Site.GetPage (printf "/authors/%s" (. | urlize))) }}
By <a href="{{ .URL }}">{{ .Title }}</a>
By <a href="{{ .Permalink }}">{{ .Title }}</a>
{{ end }}
{{ end }}
</p>
Expand Down

0 comments on commit e09dfe6

Please sign in to comment.