Skip to content

Instantly share code, notes, and snippets.

@cloudnull
Created November 2, 2017 23:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cloudnull/2e1ae0ccbd21209e89600af3f8024a4b to your computer and use it in GitHub Desktop.
Save cloudnull/2e1ae0ccbd21209e89600af3f8024a4b to your computer and use it in GitHub Desktop.
ghost syntax hylighting and google analytics
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'XX-XXXXXXXX-X', 'auto');
ga('send', 'pageview');
</script>
<meta name="p:domain_verify" content="XXXXXX"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css">
<style>
.main-header {
position: relative;
display: table;
height: 74vh;
margin-bottom: 5rem;
text-align: center;
vertical-align: middle;
margin-left: auto;
margin-right: auto;
background: #222 no-repeat center center;
background-size: cover;
overflow: hidden;
}
pre {
word-wrap: normal;
-moz-hyphens: none;
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
font-size: 0.7em;
line-height: 1.3em;
}
pre code, pre tt {
white-space: pre;
}
img[alt="img-float-left"] {
float: left;
margin: 0px -100px 0px 100px;
padding: inherit;
position: inherit;
}
img[alt="img-float-right"] {
float: right;
margin: 0px -145px 0px 150px;
padding: 0.6em 0.6em 0.6em 0.6em;
position: relative;
}
img[alt="screenshot"] {
width: 60%;
}
img[alt="screenshot-small"] {
width: 30%;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment