From 2673cafe47751e417e2a045a76c814d73e7d8f84 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sun, 28 Nov 2021 16:35:55 +0100 Subject: [PATCH] Updated documentation --- docs/upgrade.md | 919 ++++++++++++++++++++++++++++++------------------ 1 file changed, 585 insertions(+), 334 deletions(-) diff --git a/docs/upgrade.md b/docs/upgrade.md index 9120c683c..69fd2bd38 100644 --- a/docs/upgrade.md +++ b/docs/upgrade.md @@ -66,6 +66,277 @@ viewports]: [Tabbed]: setup/extensions/python-markdown-extensions.md#tabbed [better behavior on mobile viewports]: https://twitter.com/squidfunk/status/1424740370596958214 +### Changes to `*.html` files { data-search-exclude } + +The templates have undergone a set of changes to make them future-proof. If +you've used theme extension to override a block or template, make sure that it +matches the new structure: + +- If you've overridden a __block__, check `base.html` for potential changes +- If you've overridden a __template__, check the respective `*.html` file for + potential changes + +=== ":octicons-file-code-16: base.html" + + ``` diff + @@ -38,13 +38,6 @@ + + {% endif %} + + - + - {% if page and page.meta and page.meta.keywords %} + - + - {% elif config.site_keywords %} + - + - {% endif %} + - + + {% if page and page.meta and page.meta.author %} + + @@ -120,27 +113,21 @@ + /> + + {% endif %} + {% endblock %} + + - + - {% if config.extra.manifest %} + - + - {% endif %} + - + + {% for path in config["extra_css"] %} + + {% endfor %} + + + + + {% include "partials/javascripts/base.html" %} + + + + {% block analytics %} + {% include "partials/integrations/analytics.html" %} + @@ -172,7 +159,6 @@ + + + {% set features = config.theme.features or [] %} + - {% include "partials/javascripts/base.html" %} + + + {% if not config.theme.palette is mapping %} + @@ -214,14 +200,28 @@ + +
+ {% if self.announce() %} + -
+ ``` + +=== ":octicons-file-code-16: partials/copyright.html" + + ``` diff + @@ -0,0 +1,39 @@ + + + + + + + + + ``` + +=== ":octicons-file-code-16: partials/footer.html" + + ``` diff + @@ -83,28 +81,12 @@ + + + + ``` + +=== ":octicons-file-code-16: partials/social.html" + + ``` diff + @@ -22,23 +22,21 @@ + - + -{% if config.extra.social %} + - + -{% endif %} + + + +
+ + {% for social in config.extra.social %} + + {% set title = social.name %} + + {% if not title and "//" in social.link %} + + {% set _, url = social.link.split("//") %} + + {% set title = url.split("/")[0] %} + + {% endif %} + + + + {% include ".icons/" ~ social.icon ~ ".svg" %} + + + + {% endfor %} + +
+ ``` + ## Upgrading from 6.x to 7.x ### What's new? @@ -114,45 +385,45 @@ matches the new structure: ``` diff @@ -61,7 +61,7 @@ - font.text | replace(' ', '+') + ':300,400,400i,700%7C' + - font.code | replace(' ', '+') - }}&display=fallback"> + font.text | replace(' ', '+') + ':300,400,400i,700%7C' + + font.code | replace(' ', '+') + }}&display=fallback"> - + - {% endif %} - {% endblock %} - {% if config.extra.manifest %} + {% endif %} + {% endblock %} + {% if config.extra.manifest %} @@ -131,7 +131,7 @@ - {% if page and page.meta and page.meta.hide %} - {% set hidden = "hidden" if "navigation" in page.meta.hide %} - {% endif %} + {% if page and page.meta and page.meta.hide %} + {% set hidden = "hidden" if "navigation" in page.meta.hide %} + {% endif %} -