File tree Expand file tree Collapse file tree 5 files changed +17
-0
lines changed
Expand file tree Collapse file tree 5 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 55# Local build the website
66build :
77 jekyll build
8+ # Test Google Analytics
9+ build-prod :
10+ JEKYLL_ENV=production jekyll build
811# Generate pdf files
912pdf :
1013 bash ${PWD} /bin/pdf-product2.sh
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ Made a Github Page repo in order to use one single data.yaml file to generate a
1616 - ` echo 'export PATH="/usr/local/lib/ruby/gems/3.1.0/bin:$PATH"' >> ~/.zshrc `
1717 - Ruby 3.0.0+: ` bundle add webrick ` + ` bundle clean --force `
1818- Set up Prince from [ here] ( https://idratherbewriting.com/documentation-theme-jekyll/mydoc_generating_pdfs.html#1-set-up-prince )
19+ - Set up Google Analytics [ here] ( https://desiredpersona.com/google-analytics-jekyll/ )
1920- Follow the project root directory ` Makefile `
2021
2122
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ location: Houston, TX
3030linkedin : https://www.linkedin.com/in/drewyang/
3131github : https://github.com/yambottle
3232website : https://yambottle.github.io/me/more.html
33+ google_analytics : G-G8FDXGZ48K
3334
3435# Build settings
3536encoding : " utf-8"
Original file line number Diff line number Diff line change 1+ < script async src ="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }} "> </ script >
2+ < script >
3+ window . dataLayer = window . dataLayer || [ ] ;
4+ function gtag ( ) { dataLayer . push ( arguments ) ; }
5+ gtag ( 'js' , new Date ( ) ) ;
6+
7+ gtag ( 'config' , '{{ site.google_analytics }}' ) ;
8+ </ script >
Original file line number Diff line number Diff line change 2929 <!-- Custom CSS -->
3030 < link rel ="stylesheet " href ="{{ site.baseurl }}/assets/css/styles.css ">
3131
32+ {% if site.google_analytics and jekyll.environment == 'production' %}
33+ {% include analytics.html %}
34+ {% endif %}
35+
3236</ head >
You can’t perform that action at this time.
0 commit comments