Procházet zdrojové kódy

some updates for twitter card

pull/141/head
abhidj0090 před 4 roky
rodič
revize
979b2c0f3b
2 změnil soubory, kde provedl 7 přidání a 2 odebrání
  1. 1
    0
      exampleSite/config.toml
  2. 6
    2
      layouts/partials/head.html

+ 1
- 0
exampleSite/config.toml Zobrazit soubor

@@ -57,6 +57,7 @@ google_analytics_id = ""
logo = "images/logo.jpg"
post_share = true
staticAddress = "https://calcomp.netlify.app"
twitterSite="@1919Calcutta"
[params.cookies]
enable = false
expire_days = 2

+ 6
- 2
layouts/partials/head.html Zobrazit soubor

@@ -13,9 +13,13 @@
{{ $url := site.Params.staticAddress }}
{{ template "_internal/opengraph.html" . }}
<meta name="og:image" content="{{ with .Params.image }}{{$url}}{{ . | absURL }}{{ else }}{{$url}}{{ `images/Cover.jpg` | absURL}}{{end}}">
{{ template "_internal/twitter_cards.html" . }}

<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:title" content="{{ .Title }}"/>
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}"/>
<meta name="twitter:image" content="{{ with .Params.image }}{{$url}}{{ . | absURL}}{{ else }}{{$url}}{{ `images/Cover.jpg` | absURL}}{{end}}">
<meta property="twitter:site" content="{{site.Params.twitterSite}}" />
<meta property="twitter:creator" content="{{site.Params.twitterSite}}" />

<link rel="canonical" href="{{ .Permalink }}">
{{ "<!-- plugins -->" | safeHTML }}

Načítá se…
Zrušit
Uložit