Add analytics.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Oly 2023-06-21 15:01:04 +01:00
parent 3ba9cdec4c
commit aa89814afe
2 changed files with 17 additions and 6 deletions

View File

@ -84,6 +84,15 @@
right: 12px;
</style>
<meta name="robots" content="noindex">
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-59HNPDZF2T"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-59HNPDZF2T');
</script>
</head>
<body class="f5 sans-serif">

View File

@ -12,7 +12,7 @@
[cl-eorg.html :as h :refer [body headers org->replacements]]
[cl-eorg.parser :as o :refer [parse]]
[cl-eorg.themes.tachyon :refer [tachyon-theme]]
[clojure.set :refer [rename-keys]]
[clojure.string :as str]
[honey.sql :as sql]
[honey.sql.helpers :as sqlh]
[reagent.core :as reagent]
@ -28,6 +28,8 @@
(def languages
{"clojure" {:mode "clojure"}
"clojurescript" {:mode "clojure"}
"html" {:mode "html"}
"json" {:mode "json"}
"yaml" {:mode "yaml"}})
(def yaml-mode (LanguageSupport. (.define StreamLanguage yaml)))
@ -64,9 +66,9 @@
(when s
(str ;;"toc"
(-> s
(clojure.string/lower-case)
(clojure.string/replace #"[^\w]+" "-")
(clojure.string/replace #"^-\\|-\\-$" "")))))
(str/lower-case)
(str/replace #"[^\w]+" "-")
(str/replace #"^-\\|-\\-$" "")))))
(defn fetch-selected-text
"Get the users selected text"
@ -303,7 +305,7 @@
(group-by (fn [block] (:tangle (second block))))
(reduce (fn [m [k v]]
(conj m {:name (str k)
:content (str (clojure.string/join "\n\n" (mapv last v)))})) [])))
:content (str (str/join "\n\n" (mapv last v)))})) [])))
(defn org->split2
"Split out meta and body"
@ -480,7 +482,7 @@
(and
(ignore-anchor-click? router e el uri)
(not (let [href (or (.-href el) "")
result (clojure.string/includes? href "#")]
result (str/includes? href "#")]
#_(when result
;(.preventDefault e)
#_(js/console.log "will prevent by href" href))