Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pi-www-theme-soho
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Institut π
pi-www-theme-soho
Commits
b8c709e7
Commit
b8c709e7
authored
5 years ago
by
Alexandre Vicenzi
Browse files
Options
Downloads
Patches
Plain Diff
SEO
parent
a48ee22a
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+16
-1
16 additions, 1 deletion
README.md
layouts/_default/baseof.html
+21
-8
21 additions, 8 deletions
layouts/_default/baseof.html
layouts/partials/seo.html
+81
-0
81 additions, 0 deletions
layouts/partials/seo.html
with
118 additions
and
9 deletions
README.md
+
16
−
1
View file @
b8c709e7
...
@@ -4,6 +4,21 @@ Lanyon is a minimalist two-column [hugo](https://gohugo.io) theme based on [Hyde
...
@@ -4,6 +4,21 @@ Lanyon is a minimalist two-column [hugo](https://gohugo.io) theme based on [Hyde


## Features
-
Mobile First
-
Responsive
-
Semantic
-
SEO Best Practices
-
Open Graph
-
Rich Snippets (JSON-LD)
-
Customizable
## Integrations
-
[
Disqus
](
https://disqus.com/
)
-
[
Google Analytics
](
https://www.google.com/analytics/web/
)
## Installation
## Installation
To install Lanyon as your default theme, first install this repository in the
`themes/`
directory:
To install Lanyon as your default theme, first install this repository in the
`themes/`
directory:
...
@@ -22,7 +37,6 @@ at the top of the file.
...
@@ -22,7 +37,6 @@ at the top of the file.
```
toml
```
toml
baseURL
=
"https://example.com"
baseURL
=
"https://example.com"
title
=
"Lanyon"
title
=
"Lanyon"
author
=
"Author Name"
languageCode
=
"en"
languageCode
=
"en"
enableInlineShortcodes
=
true
enableInlineShortcodes
=
true
...
@@ -30,6 +44,7 @@ summarylength = 10
...
@@ -30,6 +44,7 @@ summarylength = 10
enableEmoji
=
true
enableEmoji
=
true
[params]
[params]
author
=
"Author Name"
description
=
"My Blog"
description
=
"My Blog"
## Set one of:
## Set one of:
...
...
This diff is collapsed.
Click to expand it.
layouts/_default/baseof.html
+
21
−
8
View file @
b8c709e7
...
@@ -2,10 +2,8 @@
...
@@ -2,10 +2,8 @@
<html
xmlns=
"http://www.w3.org/1999/xhtml"
{{
with
.
Site.LanguageCode
}}
xml:lang=
"{{.}}"
lang=
"{{.}}"
{{
end
}}
>
<html
xmlns=
"http://www.w3.org/1999/xhtml"
{{
with
.
Site.LanguageCode
}}
xml:lang=
"{{.}}"
lang=
"{{.}}"
{{
end
}}
>
<head>
<head>
<meta
http-equiv=
"content-type"
content=
"text/html; charset=utf-8"
>
<meta
http-equiv=
"content-type"
content=
"text/html; charset=utf-8"
>
{{ hugo.Generator }}
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
{{ hugo.Generator }}
{{ if .IsHome -}}
{{ if .IsHome -}}
<title>
{{ .Site.Title }}
</title>
<title>
{{ .Site.Title }}
</title>
...
@@ -15,9 +13,20 @@
...
@@ -15,9 +13,20 @@
<meta
name=
"description"
content=
"{{if .IsHome}}{{ $.Site.Params.description }}{{else}}{{.Description}}{{end}}"
/>
<meta
name=
"description"
content=
"{{if .IsHome}}{{ $.Site.Params.description }}{{else}}{{.Description}}{{end}}"
/>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"{{ .Site.BaseURL }}css/print.css"
media=
"print"
>
{{ partial "seo.html" . }}
<link
type=
"text/css"
rel=
"stylesheet"
href=
"{{ .Site.BaseURL }}css/poole.css"
>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"{{ .Site.BaseURL }}css/hyde.css"
>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"{{ .Site.BaseURL }}css/print.css"
media=
"print"
>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"{{ .Site.BaseURL }}css/poole.css"
>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"{{ .Site.BaseURL }}css/hyde.css"
>
{{ partial "theme-color.html" . }}
{{ partial "theme-color.html" . }}
...
@@ -25,14 +34,18 @@
...
@@ -25,14 +34,18 @@
<link
type=
"text/css"
rel=
"stylesheet"
href=
"{{ $.Site.BaseURL }}{{ . }}"
>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"{{ $.Site.BaseURL }}{{ . }}"
>
{{- end}}
{{- end}}
<link
href=
"https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700&display=swap"
rel=
"stylesheet"
>
<link
rel=
"stylesheet"
href=
"https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700&display=swap"
>
<link
rel=
"stylesheet"
<link
rel=
"stylesheet"
href=
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css"
href=
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css"
integrity=
"sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk="
integrity=
"sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk="
crossorigin=
"anonymous"
/>
crossorigin=
"anonymous"
/>
<link
rel=
"apple-touch-icon-precomposed"
sizes=
"144x144"
href=
"/apple-touch-icon-144-precomposed.png"
>
<link
rel=
"apple-touch-icon-precomposed"
sizes=
"144x144"
href=
"/apple-touch-icon-144-precomposed.png"
>
<link
rel=
"shortcut icon"
href=
"/favicon.png"
>
<link
rel=
"shortcut icon"
href=
"/favicon.png"
>
<!-- RSS -->
<!-- RSS -->
...
...
This diff is collapsed.
Click to expand it.
layouts/partials/seo.html
0 → 100644
+
81
−
0
View file @
b8c709e7
<meta
property=
"og:locale"
content=
"{{ .Site.LanguageCode }}"
/>
{{ with .Site.Params.gravatar }}
<meta
property=
"og:image"
content=
"https://www.gravatar.com/avatar/{{md5 .}}?s=400&d=mp"
>
{{- else -}}
{{ with .Site.Params.profilePicture }}
<meta
property=
"og:image"
content=
"{{ $.Site.BaseURL }}{{ . }}"
>
{{- end -}}
{{ end }}
{{ if eq .Type "post" }}
<meta
property=
"og:site_name"
content=
"{{ .Site.Title }}"
/>
<meta
property=
"og:title"
content=
"{{ .Title }}"
/>
<meta
property=
"og:description"
content=
"{{ if .Description }}{{ .Description }}{{ else }}{{ .Summary }}{{ end }}"
/>
<meta
property=
"og:url"
content=
"{{ .Permalink }}"
/>
<meta
property=
"og:type"
content=
"article"
/>
<meta
property=
"article:published_time"
content=
"{{ .Date.Format "
2006
-01-02T15:04:05Z0700
"
}}"
/>
<meta
property=
"article:modified_time"
content=
"{{ .Date.Format "
2006
-01-02T15:04:05Z0700
"
}}"
/>
<meta
property=
"article:author"
content=
"{{ .Site.Params.author }}"
>
<!-- <meta property="article:section" content="category"/> -->
<!-- <meta property="article:tag" content="tag"/> -->
{{ else }}
<meta
property=
"og:type"
content=
"blog"
/>
<meta
property=
"og:site_name"
content=
"{{ .Site.Title }}"
/>
{{- if .IsHome }}
<meta
property=
"og:title"
content=
"{{ .Site.Title }}"
/>
<meta
property=
"og:url"
content=
"{{ .Site.BaseURL }}"
/>
<meta
property=
"og:description"
content=
"{{ .Site.Params.description }}"
/>
{{- else -}}
<meta
property=
"og:title"
content=
"{{ .Title }}"
/>
<meta
property=
"og:url"
content=
"{{ .Permalink }}"
/>
<meta
property=
"og:description"
content=
"{{ if .Description }}{{ .Description }}{{ else }}{{ .Summary }}{{ end }}"
/>
{{- end -}}
{{ end }}
<script
type=
"application/ld+json"
>
{
"
@context
"
:
"
http://schema.org
"
,
"
@type
"
:
"
Blog
"
,
"
name
"
:
{{
.
Site
.
Title
}},
"
url
"
:
{{
.
Site
.
BaseURL
}},
{{
-
with
.
Site
.
Params
.
gravatar
}}
"
image
"
:
"
https://www.gravatar.com/avatar/{{md5 .}}?s=400&d=mp
"
,
{{
-
else
-
}}
{{
with
.
Site
.
Params
.
profilePicture
}}
"
image
"
:
{{
.
|
printf
"
%s%s
"
$
.
Site
.
BaseURL
}},
{{
-
end
-
}}
{{
-
end
}}
"
description
"
:
"
{{ .Site.Params.description }}
"
}
</script>
{{ if eq .Type "post" }}
<script
type=
"application/ld+json"
>
{
"
@context
"
:
"
http://schema.org
"
,
"
@type
"
:
"
BlogPosting
"
,
"
name
"
:
"
{{ .Title }}
"
,
"
headline
"
:
"
{{ .Title }}
"
,
"
datePublished
"
:
"
{{ .Date.Format
"
2006
-
01
-
02
T15
:
04
:
05
Z0700
"
}}
"
,
"
dateModified
"
:
"
{{ .Date.Format
"
2006
-
01
-
02
T15
:
04
:
05
Z0700
"
}}
"
,
"
author
"
:
{
"
@type
"
:
"
Person
"
,
"
name
"
:
"
{{ .Site.Params.author }}
"
,
"
url
"
:
{{
.
Site
.
BaseURL
}}
},
{{
-
with
.
Site
.
Params
.
gravatar
}}
"
image
"
:
"
https://www.gravatar.com/avatar/{{md5 .}}?s=400&d=mp
"
,
{{
-
else
-
}}
{{
with
.
Site
.
Params
.
profilePicture
}}
"
image
"
:
{{
.
|
printf
"
%s%s
"
$
.
Site
.
BaseURL
}},
{{
-
end
-
}}
{{
-
end
}}
"
url
"
:
{{
.
Permalink
}},
"
description
"
:
"
{{ if .Description }}{{ .Description }}{{ else }}{{ .Summary }}{{ end }}
"
}
</script>
{{ end }}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment