google analytics on website, not local

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-11-08 23:00:04 +00:00
parent b92016218d
commit 762cd8d601
2 changed files with 14 additions and 0 deletions

View File

@@ -28,8 +28,10 @@ from the README to example sources to GitHub rather than locally.
def timed_main(self):
asciidoctor_dir = os.path.join(self.env['root_dir'], 'asciidoctor')
github_pages_opts = []
if self.env['github_pages']:
link_target_script = 'link-target-github.rb'
github_pages_opts.extend(['--attribute', 'docinfo=shared', LF])
else:
link_target_script = 'link-target-up.rb'
exit_status = self.sh.run_cmd(
@@ -40,6 +42,9 @@ from the README to example sources to GitHub rather than locally.
'--out-file', self.env['readme_out'], LF,
'--trace', LF,
'--verbose', LF,
] +
github_pages_opts +
[
self.env['readme'], LF,
],
out_file=self.env['build_doc_log'],

9
docinfo-footer.html Normal file
View File

@@ -0,0 +1,9 @@
<script>
<!-- Google Analytics, AKA selling my soul to Google for some backlinks. -->
(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', 'UA-47867706-1', 'auto');
ga('send', 'pageview');
</script>