add cloudflare web analytics and some sweeping
This commit is contained in:
parent
e5d64e7153
commit
0d97b24ebe
4 changed files with 40 additions and 28 deletions
4
scripts/cf_analytics.js
Normal file
4
scripts/cf_analytics.js
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
|
||||||
|
hexo.extend.injector.register('body_end', () => {
|
||||||
|
return `<!-- Cloudflare Web Analytics --><script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "05f36e0cb3b74781a5755bd4224e252a"}'></script><!-- End Cloudflare Web Analytics -->`;
|
||||||
|
});
|
|
@ -4,7 +4,7 @@ menu:
|
||||||
|
|
||||||
copyright_addtional: ""
|
copyright_addtional: ""
|
||||||
|
|
||||||
copyright_year_string: "2020-2021"
|
copyright_year_string: "2020-2022"
|
||||||
|
|
||||||
theme_self_claim: true
|
theme_self_claim: true
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
{% set pageTitle = config.title %}
|
{% set pageTitle = config.title %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% set theme_data = site.data.theme %}
|
||||||
|
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="{{ config.language }}">
|
<html lang="{{ config.language }}">
|
||||||
<head>
|
<head>
|
||||||
|
@ -37,19 +39,11 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<ul id="nav-mobile" class="sidenav">
|
<ul id="nav-mobile" class="sidenav">
|
||||||
{% if site.data.theme.menu %}
|
{% for key, path in theme_data.menu %}
|
||||||
{% for key, path in site.data.theme.menu %}
|
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ path }}">{{ key }}</a>
|
<a href="{{ path }}">{{ key }}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
|
||||||
{% for key, path in theme.menu %}
|
|
||||||
<li>
|
|
||||||
<a href="{{ path }}">{{ key }}</a>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
</ul>
|
||||||
<nav class="light-blue lighten-1" role="navigation">
|
<nav class="light-blue lighten-1" role="navigation">
|
||||||
<a href="#" data-target="nav-mobile" class="sidenav-trigger">
|
<a href="#" data-target="nav-mobile" class="sidenav-trigger">
|
||||||
|
@ -57,19 +51,11 @@
|
||||||
</a>
|
</a>
|
||||||
<div class="nav-wrapper">
|
<div class="nav-wrapper">
|
||||||
<ul class="right hide-on-med-and-down">
|
<ul class="right hide-on-med-and-down">
|
||||||
{% if site.data.theme.menu %}
|
|
||||||
{% for key, path in site.data.theme.menu %}
|
{% for key, path in site.data.theme.menu %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ path }}">{{ key }}</a>
|
<a href="{{ path }}">{{ key }}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
|
||||||
{% for key, path in theme.menu %}
|
|
||||||
<li>
|
|
||||||
<a href="{{ path }}">{{ key }}</a>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
22
themes/cmd/theme.yaml.example
Normal file
22
themes/cmd/theme.yaml.example
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
|
||||||
|
menu:
|
||||||
|
Home: /
|
||||||
|
Archives: /archives
|
||||||
|
|
||||||
|
copyright_addtional: ""
|
||||||
|
|
||||||
|
copyright_year_string: "2020-2021"
|
||||||
|
|
||||||
|
theme_self_claim: true
|
||||||
|
|
||||||
|
about_this_blog: This blog is created with Classical Material Desgin, which try to keep the original taste of Material Design for hexo.
|
||||||
|
|
||||||
|
my_mastodon: https://mastodon.example.com/@example
|
||||||
|
|
||||||
|
footer_links:
|
||||||
|
Link 1: "https://example.org"
|
||||||
|
Link 2: "https://example.com"
|
||||||
|
|
||||||
|
# All contents here will be added to the end of body
|
||||||
|
script_snippets:
|
||||||
|
# - "<script> console.log('Hello, friend!'); </script>"
|
Loading…
Reference in a new issue