diff --git a/.circleci/config.yml b/.circleci/config.yml
index 0edf2f8..acb4db1 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -22,10 +22,13 @@ jobs:
- run:
working_directory: my-site/themes/hugo-fresh
command: |
- if [[ ${CIRCLE_BRANCH} == "*pull*" ]]; then
+ isPrIfGreaterThanZero=$(expr $CIRCLE_BRANCH : "pull")
+ if [ isPrIfGreaterThanZero > 0 ]; then
+ echo "Hello World $CIRCLE_BRANCH"
git fetch origin ${CIRCLE_BRANCH}/head:BRANCHNAME
git checkout BRANCHNAME
else
+ echo "Hello World else $CIRCLE_BRANCH"
git checkout ${CIRCLE_BRANCH}
fi
@@ -33,9 +36,9 @@ jobs:
name: Replace default config
working_directory: my-site
command: |
- if [[ ${CIRCLE_BRANCH} == "*pull*" ]]; then
- git fetch origin ${CIRCLE_BRANCH}/head:BRANCHNAME
- branch=BRANCHNAME
+ isPrIfGreaterThanZero=$(expr $CIRCLE_BRANCH : "pull")
+ if [ isPrIfGreaterThanZero > 0 ]; then
+ branch=${CIRCLE_SHA1}
else
branch=${CIRCLE_BRANCH}
fi
@@ -47,7 +50,7 @@ jobs:
working_directory: my-site
command: |
apk add sed
- URL=hugo-fresh-$(echo $CIRCLE_BRANCH | tr _ -)
+ URL=hugo-fresh-$(echo $CIRCLE_BRANCH | tr _ - | tr / -)
if [ $CIRCLE_BRANCH == "master" ]; then
URL=hugo-fresh
fi
@@ -63,7 +66,7 @@ jobs:
name: Create now.json
working_directory: my-site/public
command: |
- URL=hugo-fresh-$(echo $CIRCLE_BRANCH | tr _ -)
+ URL=hugo-fresh-$(echo $CIRCLE_BRANCH | tr _ - | tr / -)
if [ $CIRCLE_BRANCH == "master" ]; then
URL=hugo-fresh
fi
diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml
index a37018c..83f6c95 100644
--- a/exampleSite/config.yaml
+++ b/exampleSite/config.yaml
@@ -2,6 +2,7 @@ baseURL: http://something-fresh.org/
languageCode: en-us
title: Hugo Fresh Theme
theme: hugo-fresh
+googleAnalytics: #Put in your tracking code without quotes like this: UA-XXXXXX...
params:
navbarlogo:
diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html
index eac0aa3..b894f4d 100644
--- a/layouts/partials/meta.html
+++ b/layouts/partials/meta.html
@@ -1,3 +1,4 @@
+{{ template "_internal/google_analytics_async.html" . }}
\ No newline at end of file