Removed deprecated meta data features

This commit is contained in:
squidfunk 2020-09-27 08:54:36 +02:00
parent c4be8b34ab
commit e6ceb89d70
18 changed files with 21 additions and 243 deletions

View File

@ -13,7 +13,7 @@ not be used anymore.
### Redirect
:octicons-archive-24: Deprecated: 5.5 ·
:octicons-trash-24: Removal: 6.x
:octicons-trash-24: Removed: 6.0
The `redirect` key, which could be added via [Metadata][1], allowed to
specify a redirect from within a document to a new address, which is a good
@ -48,7 +48,7 @@ plugins:
### Source link
:octicons-archive-24: Deprecated: 5.5 ·
:octicons-trash-24: Removal: 6.x
:octicons-trash-24: Removed: 6.0
The `source` and `path` keys, which could be added via [Metadata][1], showed
a source icon at the top right corner of a document, linking a document to a
@ -78,7 +78,7 @@ at arbitrary positions in any document.
### Hero
:octicons-archive-24: Deprecated: 5.5 ·
:octicons-trash-24: Removal: 6.x
:octicons-trash-24: Removed: 6.0
The `hero` key, which could be added via [Metadata][1], allowed to render a
simple, text-only and page-local teaser text as part of a document. It could

View File

@ -5,10 +5,10 @@
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.581c8fc6.min.js.map",
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.5eca75d3.min.js",
"assets/javascripts/worker/search.js.map": "assets/javascripts/worker/search.5eca75d3.min.js.map",
"assets/stylesheets/main.css": "assets/stylesheets/main.593e13b9.min.css",
"assets/stylesheets/main.css.map": "assets/stylesheets/main.593e13b9.min.css.map",
"assets/stylesheets/main.css": "assets/stylesheets/main.45ead06e.min.css",
"assets/stylesheets/main.css.map": "assets/stylesheets/main.45ead06e.min.css.map",
"assets/stylesheets/overrides.css": "assets/stylesheets/overrides.9514a156.min.css",
"assets/stylesheets/overrides.css.map": "assets/stylesheets/overrides.9514a156.min.css.map",
"assets/stylesheets/palette.css": "assets/stylesheets/palette.ff0a5ce4.min.css",
"assets/stylesheets/palette.css.map": "assets/stylesheets/palette.ff0a5ce4.min.css.map"
"assets/stylesheets/palette.css": "assets/stylesheets/palette.6b892c47.min.css",
"assets/stylesheets/palette.css.map": "assets/stylesheets/palette.6b892c47.min.css.map"
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -18,12 +18,7 @@
{% elif config.site_description %}
<meta name="description" content="{{ config.site_description }}">
{% endif %}
{% if page and page.meta and page.meta.redirect %}
<script>var anchor=window.location.hash.substr(1);location.href="{{ page.meta.redirect }}"+(anchor?"#"+anchor:"")</script>
<meta http-equiv="refresh" content="0; url={{ page.meta.redirect }}">
<meta name="robots" content="noindex">
<link rel="canonical" href="{{ page.meta.redirect }}">
{% elif page.canonical_url %}
{% if page.canonical_url %}
<link rel="canonical" href="{{ page.canonical_url }}">
{% endif %}
{% if page and page.meta and page.meta.author %}
@ -44,9 +39,9 @@
{% endif %}
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.593e13b9.min.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.45ead06e.min.css' | url }}">
{% if palette.scheme or palette.primary or palette.accent %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.ff0a5ce4.min.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.6b892c47.min.css' | url }}">
{% endif %}
{% if palette.primary %}
{% import "partials/palette.html" as map %}
@ -116,11 +111,7 @@
{% include "partials/header.html" %}
{% endblock %}
<div class="md-container" data-md-component="container">
{% block hero %}
{% if page and page.meta and page.meta.hero %}
{% include "partials/hero.html" with context %}
{% endif %}
{% endblock %}
{% block hero %}{% endblock %}
{% block tabs %}
{% if "tabs" in config.theme.features %}
{% include "partials/tabs.html" %}
@ -156,11 +147,6 @@
{% include ".icons/material/pencil.svg" %}
</a>
{% endif %}
{% block source %}
{% if page and page.meta and page.meta.source %}
{% include "partials/source-link.html" %}
{% endif %}
{% endblock %}
{% if not "\x3ch1" in page.content %}
<h1>{{ page.title | default(config.site_name, true)}}</h1>
{% endif %}

View File

@ -1,12 +0,0 @@
{#-
This file was automatically generated - do not edit
-#}
{% set class = "md-hero" %}
{% if "tabs" not in config.theme.features %}
{% set class = "md-hero md-hero--expand" %}
{% endif %}
<div class="{{ class }}" data-md-component="hero">
<div class="md-hero__inner md-grid">
{{ page.meta.hero }}
</div>
</div>

View File

@ -1,14 +0,0 @@
{#-
This file was automatically generated - do not edit
-#}
{% import "partials/language.html" as lang with context %}
{% set repo = config.repo_url %}
{% if repo | last == "/" %}
{% set repo = repo[:-1] %}
{% endif %}
{% set path = page.meta.path | default("") %}
<a href="{{ [repo, path, page.meta.source] | join('/') }}" title="{{ page.meta.source }}" class="md-content__button md-icon">
{{ lang.t("meta.source") }}
{% set icon = config.theme.icon.repo or "fontawesome/brands/git-alt" %}
{% include ".icons/" ~ icon ~ ".svg" %}
</a>

View File

@ -48,7 +48,6 @@
@import "main/layout/content";
@import "main/layout/dialog";
@import "main/layout/header";
@import "main/layout/hero";
@import "main/layout/footer";
@import "main/layout/nav";
@import "main/layout/search";

View File

@ -1,65 +0,0 @@
////
/// Copyright (c) 2016-2020 Martin Donath <martin.donath@squidfunk.com>
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Hero teaser
.md-hero {
overflow: hidden;
color: var(--md-primary-bg-color);
font-size: px2rem(20px);
background-color: var(--md-primary-fg-color);
transition: background 250ms;
// Inner wrapper
&__inner {
margin-top: px2rem(20px);
padding: px2rem(16px) px2rem(16px) px2rem(8px);
transition:
transform 400ms cubic-bezier(0.1, 0.7, 0.1, 1),
opacity 250ms;
transition-delay: 100ms;
// [tablet -]: Compensate for missing tabs
@include break-to-device(tablet) {
margin-top: px2rem(48px);
margin-bottom: px2rem(24px);
}
// Fade-out tabs background upon scrolling
[data-md-state="hidden"] & {
transform: translateY(px2rem(12.5px));
opacity: 0;
transition:
transform 0ms 400ms,
opacity 100ms 0ms;
pointer-events: none;
}
// Adjust bottom spacing if there are no tabs
.md-hero--expand & {
margin-bottom: px2rem(24px);
}
}
}

View File

@ -78,20 +78,6 @@
// Typeset color shades
--md-typeset-a-color: hsla(#{hex2hsl($clr-indigo-500)}, 1);
// Add a border if there are no tabs
.md-hero--expand {
border-bottom: px2rem(1px) solid hsla(0, 0%, 0%, 0.07);
}
// [tablet -]: Set bottom border for hero
@include break-to-device(tablet) {
// Hero teaser
.md-hero {
border-bottom: px2rem(1px) solid hsla(0, 0%, 0%, 0.07);
}
}
// [tablet portrait +]: Change color of search input
@include break-from-device(tablet landscape) {
@ -146,11 +132,6 @@
background-color: hsla(0, 0%, 0%, 1);
}
// Hero teaser
.md-hero {
background-color: hsla(0, 0%, 0%, 1);
}
// [tablet portrait -]: Layered navigation
@include break-to-device(tablet portrait) {

View File

@ -45,21 +45,8 @@
<meta name="description" content="{{ config.site_description }}" />
{% endif %}
<!-- Redirect -->
{% if page and page.meta and page.meta.redirect %}
<script>
var anchor = window.location.hash.substr(1)
location.href = '{{ page.meta.redirect }}' +
(anchor ? '#' + anchor : '')
</script>
<!-- Fallback in case JavaScript is not available -->
<meta http-equiv="refresh" content="0; url={{ page.meta.redirect }}" />
<meta name="robots" content="noindex" />
<link rel="canonical" href="{{ page.meta.redirect }}" />
<!-- Canonical -->
{% elif page.canonical_url %}
{% if page.canonical_url %}
<link rel="canonical" href="{{ page.canonical_url }}" />
{% endif %}
@ -243,13 +230,9 @@
<div class="md-container" data-md-component="container">
<!-- Hero teaser -->
{% block hero %}
{% if page and page.meta and page.meta.hero %}
{% include "partials/hero.html" with context %}
{% endif %}
{% endblock %}
{% block hero %}{% endblock %}
<!-- Tabs with outline -->
<!-- Tabs navigation -->
{% block tabs %}
{% if "tabs" in config.theme.features %}
{% include "partials/tabs.html" %}
@ -310,13 +293,6 @@
</a>
{% endif %}
<!-- Link to source file -->
{% block source %}
{% if page and page.meta and page.meta.source %}
{% include "partials/source-link.html" %}
{% endif %}
{% endblock %}
<!--
Hack: check whether the content contains a h1 headline. If it
doesn't, the page title (or respectively site name) is used

View File

@ -1,34 +0,0 @@
<!--
Copyright (c) 2016-2020 Martin Donath <martin.donath@squidfunk.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
-->
<!-- Determine class according to level -->
{% set class = "md-hero" %}
{% if "tabs" not in config.theme.features %}
{% set class = "md-hero md-hero--expand" %}
{% endif %}
<!-- Hero teaser -->
<div class="{{ class }}" data-md-component="hero">
<div class="md-hero__inner md-grid">
{{ page.meta.hero }}
</div>
</div>

View File

@ -1,39 +0,0 @@
<!--
Copyright (c) 2016-2020 Martin Donath <martin.donath@squidfunk.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
-->
{% import "partials/language.html" as lang with context %}
<!-- Link to source file -->
{% set repo = config.repo_url %}
{% if repo | last == "/" %}
{% set repo = repo[:-1] %}
{% endif %}
{% set path = page.meta.path | default("") %}
<a
href="{{ [repo, path, page.meta.source] | join('/') }}"
title="{{ page.meta.source }}"
class="md-content__button md-icon"
>
{{ lang.t("meta.source") }}
{% set icon = config.theme.icon.repo or "fontawesome/brands/git-alt" %}
{% include ".icons/" ~ icon ~ ".svg" %}
</a>