add google analytics and move built html

This commit is contained in:
Christian Genco 2015-04-07 01:31:02 -05:00
parent 669a78990f
commit 18c72237bd
4 changed files with 31 additions and 2 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -3,7 +3,10 @@ require 'uglifier'
task default: %w[build]
task :build do
# puts system("browserify -t coffeeify browser.app.coffee > js/markdowntomla.js")
puts "browserifying"
puts system("browserify -t coffeeify browser.app.coffee > js/markdowntomla.js")
puts "building minified self-contained index.html"
html = File.read('index.html')
bundled = html.split("\n").map{|line|
if line =~ /\<script.*src=\"(.*)\"/
@ -14,5 +17,5 @@ task :build do
line
end
}
File.open('index.min.html', 'w'){|f| f.puts bundled}
File.open('built/index.html', 'w'){|f| f.puts bundled}
end

View File

@ -2,6 +2,14 @@
<html>
<head>
<title>MarkdowntoMLA.com</title>
<meta content="Markdown to MLA" name="og:site_name" />
<meta property='og:type' name='og:type' content='website' />
<meta property='og:title' name='og:title' content='Markdown to MLA' />
<meta property='description' name='description' content='Convert markdown to MLA formatted PDFs ' />
<meta property='og:description' name='og:description' content='Blog and projects of an internet micropreneur, software engineer, mustachian, and stage actor.' />
<meta property='og:url' name='og:url' content='http://markdowntomla.com/' />
<meta property='og:image' name='og:image' content='http://i.imgur.com/JwuUAy9.png' />
<style type="text/css">
*{
margin: 0;

View File

@ -2,6 +2,14 @@
<html>
<head>
<title>MarkdowntoMLA.com</title>
<meta content="Markdown to MLA" name="og:site_name" />
<meta property='og:type' name='og:type' content='website' />
<meta property='og:title' name='og:title' content='Markdown to MLA' />
<meta property='description' name='description' content='Convert markdown to MLA formatted PDFs ' />
<meta property='og:description' name='og:description' content='Blog and projects of an internet micropreneur, software engineer, mustachian, and stage actor.' />
<meta property='og:url' name='og:url' content='http://markdowntomla.com/' />
<meta property='og:image' name='og:image' content='http://i.imgur.com/JwuUAy9.png' />
<style type="text/css">
*{
margin: 0;
@ -82,5 +90,15 @@ Wikipedia contributors. "Hacker News." Wikipedia, The Free Encyclopedia. Wikiped
<script type="text/javascript" src="./js/ace.mode-markdown.js"></script>
<script type="text/javascript" src="./js/ace.theme-textmate.js"></script>
<script type="text/javascript" src="./js/markdowntomla.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','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-61658501-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>