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

github.com/dldx/hpstr-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDurand D'souza <durand1@gmail.com>2016-10-20 07:37:36 +0300
committerDurand D'souza <durand1@gmail.com>2016-10-20 07:37:36 +0300
commit27552c8ed86e24ae79d4000b1a82f80d292c5301 (patch)
treecb8ae978e3b5c7f013e67c06ae8e5125f4cc41ef
parentecd741d08d1aa7a5b931c8246d7dfcd538c30232 (diff)
Modified the og and twitter description to work on non-post pages.
-rw-r--r--layouts/partials/twitter_og_cards.html4
-rw-r--r--static/css/_sass/_variables.scss10
-rw-r--r--static/css/main.css8
3 files changed, 11 insertions, 11 deletions
diff --git a/layouts/partials/twitter_og_cards.html b/layouts/partials/twitter_og_cards.html
index 61f7ae6..bb119dd 100644
--- a/layouts/partials/twitter_og_cards.html
+++ b/layouts/partials/twitter_og_cards.html
@@ -1,6 +1,6 @@
<!-- Twitter Cards -->
<meta name="twitter:title" content="{{ .Title }}">
-{{ with .Description }}<meta name="twitter:description" content="{{ . }}">{{ end }}
+<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{ $.Site.Params.subtitle }}{{ end }}">
{{ with .Site.Params.owner.twitter }}<meta name="twitter:creator" content="{{ . }}">{{ end }}
{{ if isset ($.Scratch.Get "Params") "image" }}
{{ $imageparams := index ($.Scratch.Get "Params") "image" }}
@@ -16,7 +16,7 @@
<!-- Open Graph -->
<meta property="og:type" content="article">
<meta property="og:title" content="{{ .Title }}">
-{{ with .Description }}<meta property="og:description" content="{{ . }}">{{ end }}
+<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{ $.Site.Params.subtitle }}{{ end }}">
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:site_name" content="{{ .Site.Title }}">
{{ with .Site.Params.locale }}<meta property="og:locale" content="{{ . }}" />{{ end }}
diff --git a/static/css/_sass/_variables.scss b/static/css/_sass/_variables.scss
index e0a47e7..0bada4f 100644
--- a/static/css/_sass/_variables.scss
+++ b/static/css/_sass/_variables.scss
@@ -2,14 +2,14 @@
SCSS Variables
========================================================================== */
-/*
+/*
Page
========================================================================== */
$feature-image-height : 400px; // min 150px recommended
$front-page-feature-image-height : 400px; // min 150px recommended
-/*
+/*
Typography
========================================================================== */
@@ -29,7 +29,7 @@ body {
font-size: 0px + $doc-font-size;
}
-/*
+/*
Colors
========================================================================== */
@@ -47,10 +47,10 @@ $danger : #C64537;
$info : #308cbc;
-/*
+/*
Screen sizes
========================================================================== */
$small : "only screen and (min-width: 30em)";
$medium : "only screen and (min-width: 48em)";
-$large : "only screen and (min-width: 62.5em)"; \ No newline at end of file
+$large : "only screen and (min-width: 62.5em)";
diff --git a/static/css/main.css b/static/css/main.css
index e24b046..f0de38f 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -10,20 +10,20 @@
/* ==========================================================================
SCSS Variables
========================================================================== */
-/*
+/*
Page
========================================================================== */
-/*
+/*
Typography
========================================================================== */
body {
margin-top: 26px;
font-size: 16px; }
-/*
+/*
Colors
========================================================================== */
-/*
+/*
Screen sizes
========================================================================== */
/* ==========================================================================