Skip to content

Instantly share code, notes, and snippets.

@jonathan-soifer
Last active January 10, 2019 22:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jonathan-soifer/e215f872fc86001d1b8e8f8897451c68 to your computer and use it in GitHub Desktop.
Save jonathan-soifer/e215f872fc86001d1b8e8f8897451c68 to your computer and use it in GitHub Desktop.
Very basic boilerplate Index.html for Hugo Static Website Generator
<!-- Doctype HTML5 -->
<!DOCTYPE html>
<html lang="en" />
<head>
<!-- Set character encoding for the document -->
<meta charset="UTF-8" />
<!-- Instruct Internet Explorer to use its latest rendering engine -->
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<!-- Viewport for responsive web design -->
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Document Title: At most 55 characters for Google Search Result Pages -->
<title>{{ .Site.Title }}</title>
<!-- Meta Description: At most 150 characters for Google Search Result Pages -->
<meta name="description" content="{{ .Site.Params.description }}" />
<!-- Helps prevent duplicate content issues with www. and non-www, for example -->
<link rel="canonical" href="{{ .Site.BaseURL }}" />
<!-- Facebook Sharing boilerplate -->
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ .Site.BaseURL }}" />
<meta property="og:title" content="{{ .Site.Title }}" />
<meta property="og:image" content="https://example.com/image.jpg" />
<meta property="og:description" content="{{ .Site.Params.description }}" />
<meta property="og:site_name" content="{{ .Site.Params.site_name }}" />
<meta property="og:locale" content="pt_BR" />
<!-- Next tags are optional but recommended -->
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<!-- Twitter Sharing boilerplate -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@site_account" />
<meta name="twitter:creator" content="@individual_account" />
<meta name="twitter:url" content="{{ .Site.BaseURL }}" />
<meta name="twitter:title" content="{{ .Site.Title }}" />
<meta name="twitter:description" content="{{ .Site.Params.description }}" />
<meta name="twitter:image" content="https://example.com/image.jpg" />
<link rel="preload" href="css/theme.css" as="style" onload="this.rel='stylesheet'">
<link rel="preload" href="css/main.css" as="style" onload="this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="css/theme.css">
<link rel="stylesheet" href="css/main.css">
</noscript>
<script>
/*! loadCSS. [c]2017 Filament Group, Inc. MIT License */
!function(a){"use strict";var b=function(b,c,d){function j(a){if(e.body)return a();setTimeout(function(){j(a)})}function l(){f.addEventListener&&f.removeEventListener("load",l),f.media=d||"all"}var g,e=a.document,f=e.createElement("link");if(c)g=c;else{var h=(e.body||e.getElementsByTagName("head")[0]).childNodes;g=h[h.length-1]}var i=e.styleSheets;f.rel="stylesheet",f.href=b,f.media="only x",j(function(){g.parentNode.insertBefore(f,c?g:g.nextSibling)});var k=function(a){for(var b=f.href,c=i.length;c--;)if(i[c].href===b)return a();setTimeout(function(){k(a)})};return f.addEventListener&&f.addEventListener("load",l),f.onloadcssdefined=k,k(l),f};"undefined"!=typeof exports?exports.loadCSS=b:a.loadCSS=b}("undefined"!=typeof global?global:this);
/*! loadCSS rel=preload polyfill. [c]2017 Filament Group, Inc. MIT License */
!function(a){if(a.loadCSS){var b=loadCSS.relpreload={};if(b.support=function(){try{return a.document.createElement("link").relList.supports("preload")}catch(a){return!1}},b.poly=function(){for(var b=a.document.getElementsByTagName("link"),c=0;c<b.length;c++){var d=b[c];"preload"===d.rel&&"style"===d.getAttribute("as")&&(a.loadCSS(d.href,d,d.getAttribute("media")),d.rel=null)}},!b.support()){b.poly();var c=a.setInterval(b.poly,300);a.addEventListener&&a.addEventListener("load",function(){b.poly(),a.clearInterval(c)}),a.attachEvent&&a.attachEvent("onload",function(){a.clearInterval(c)})}}}(this);
</script>
</head>
<body>
<main>
Yayyyy! Content!
</main>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment