Add QR code preview support
QR codes can now be generated for all pages with the post processing script the HEAD of all the html now has an open graph image tage pointing to the QR code url
This commit is contained in:
parent
63d510e077
commit
ed3428e164
@ -14,7 +14,8 @@
|
||||
<meta property="og:description" content="{{ with .Params.description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}">
|
||||
<meta property="og:type" content='{{ if .IsHome }}{{ "website" }}{{ else }}{{ "article" }}{{ end }}'>
|
||||
<meta property="og:locale" content="{{ .Site.LanguageCode }}">
|
||||
<meta property="og:image" content="<page-image-url>">
|
||||
<meta property="og:url" content="{{ .Page.Permalink }}">
|
||||
<meta property="og:image" content="{{ .Page.Permalink }}qr.png">
|
||||
{{ if isset .Params "tags" }}
|
||||
<meta name="keywords" content="{{ with .Params.tags }}{{ delimit . " , " }}{{ end }}">
|
||||
{{ end -}}
|
||||
|
7
post-process.sh
Executable file
7
post-process.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
cd public/
|
||||
|
||||
find -name *.html | while read FILE; do
|
||||
URL="$(grep -oP '(?<="og:url" content=")(.*)(?=")' $FILE)"
|
||||
qrencode $URL -o $(dirname $FILE)/qr.png
|
||||
done
|
Loading…
Reference in New Issue
Block a user