From 5375f28778973b383a8d0c543657167ac7e0a893 Mon Sep 17 00:00:00 2001 From: inferjay Date: Sat, 26 Oct 2024 10:23:59 +0800 Subject: [PATCH] add google adsense config --- mkdocs.yml | 2 +- overrides/base.html | 184 -------------------------------------------- overrides/main.html | 5 ++ 3 files changed, 6 insertions(+), 185 deletions(-) delete mode 100644 overrides/base.html create mode 100644 overrides/main.html diff --git a/mkdocs.yml b/mkdocs.yml index 5303e3f..b0856d9 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -17,7 +17,7 @@ theme: language: en logo: images/mddoc-logo.png favicon: images/favicon.ico - custom_dir: 'overrides' + custom_dir: overrides palette: - scheme: default toggle: diff --git a/overrides/base.html b/overrides/base.html deleted file mode 100644 index 07da519..0000000 --- a/overrides/base.html +++ /dev/null @@ -1,184 +0,0 @@ -{% import "partials/language.html" as lang %} - - - - {% block site_meta %} - - - - {% if page and page.meta.description %} - - {% elif config.site_description %} - - {% endif %} - {% if page.canonical_url %} - - {% endif %} - {% if page and page.meta.author %} - - {% elif config.site_author %} - - {% endif %} - {% if config.site_favicon %} - - {% else %} - - {% endif %} - - {% endblock %} - {% block htmltitle %} - {% if page and page.meta.title %} - {{ page.meta.title | first }} - {% elif page and page.title and not page.is_homepage %} - {{ page.title }} - {{ config.site_name }} - {% else %} - {{ config.site_name }} - {% endif %} - {% endblock %} - {% block libs %} - - {% endblock %} - {% block styles %} - - {% if config.extra.palette %} - - {% endif %} - {% endblock %} - {% block fonts %} - {% if config.extra.font != false and config.extra.font != "none" %} - {% set text = config.extra.get("font", {}).text | default("Roboto") %} - {% set code = config.extra.get("font", {}).code - | default("Roboto Mono") %} - {% set font = text + ":300,400,400i,700|" + code | replace(" ", "+") %} - - - {% endif %} - - {% endblock %} - {% for path in extra_css %} - - {% endfor %} - {% block extrahead %} - - {% endblock %} - - - {% set palette = config.extra.get("palette", {}) %} - {% set primary = palette.primary | replace(" ", "-") | lower %} - {% set accent = palette.accent | replace(" ", "-") | lower %} - {% if primary or accent %} - - {% else %} - - {% endif %} - - - {% set platform = config.extra.repo_icon or config.repo_url %} - {% if "github" in platform %} - {% include "assets/images/icons/github-1da075986e.svg" %} - {% elif "gitlab" in platform %} - {% include "assets/images/icons/gitlab-5ad3f9f9e5.svg" %} - {% elif "bitbucket" in platform %} - {% include "assets/images/icons/bitbucket-670608a71a.svg" %} - {% endif %} - - - - - - {% block header %} - {% include "partials/header.html" %} - {% endblock %} -
- {% set feature = config.extra.get("feature", {}) %} - {% if feature.tabs %} - {% include "partials/tabs.html" %} - {% endif %} -
-
- {% block site_nav %} - {% if nav %} -
-
-
- {% include "partials/nav.html" %} -
-
-
- {% endif %} - {% if page.toc %} -
-
-
- {% include "partials/toc.html" %} -
-
-
- {% endif %} - {% endblock %} -
-
- {% block content %} - {% if config.edit_uri %} - edit - {% endif %} - {% if not "\x3ch1" in page.content %} -

{{ page.title | default(config.site_name, true)}}

- {% endif %} - {{ page.content }} - {% block source %} - {% if page.meta.source %} -

{{ lang.t("meta.source") }}

- {% set path = (page.meta.path | default([""]) | first) %} - {% for file in page.meta.source %} - - {{ file }} - - {% endfor %} - {% endif %} - {% endblock %} - {% endblock %} - {% block disqus %} - {% if config.extra.disqus and not page.is_homepage %} -

{{ lang.t("meta.comments") }}

- {% include "partials/disqus.html" %} - {% endif %} - {% endblock %} -
-
-
-
- {% block footer %} - {% include "partials/footer.html" %} - {% endblock %} -
- {% block scripts %} - - {% set languages = lang.t("search.languages").split(",") %} - {% if languages | length and languages[0] != "" %} - {% set path = base_url + "/assets/javascripts/lunr" %} - - {% for language in languages | map("trim") %} - {% if language != "en" %} - {% if language == "jp" %} - - {% endif %} - - {% endif %} - {% endfor %} - {% if languages | length > 1 %} - - {% endif %} - {% endif %} - - {% for path in extra_javascript %} - - {% endfor %} - {% endblock %} - {% block analytics %} - {% if config.google_analytics %} - - {% endif %} - {% endblock %} - - diff --git a/overrides/main.html b/overrides/main.html new file mode 100644 index 0000000..4ac486a --- /dev/null +++ b/overrides/main.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} + +{% block extrahead %} + +{% endblock %} \ No newline at end of file