mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-12 01:50:52 +01:00
Merge branch 'master' into chore/setup-gemini-test-environment
This commit is contained in:
commit
07329f4304
@ -180,7 +180,6 @@
|
|||||||
"z-index"
|
"z-index"
|
||||||
],
|
],
|
||||||
"property-no-vendor-prefix": true,
|
"property-no-vendor-prefix": true,
|
||||||
"root-no-standard-properties": true,
|
|
||||||
"selector-class-pattern": "^[a-z0-9]+(-[a-z0-9]+)*(__[a-z]+)?(--[a-z]+)?$",
|
"selector-class-pattern": "^[a-z0-9]+(-[a-z0-9]+)*(__[a-z]+)?(--[a-z]+)?$",
|
||||||
"selector-descendant-combinator-no-non-space": null,
|
"selector-descendant-combinator-no-non-space": null,
|
||||||
"string-quotes": "double",
|
"string-quotes": "double",
|
||||||
|
@ -23,9 +23,9 @@ sudo: false
|
|||||||
|
|
||||||
# Node.js versions
|
# Node.js versions
|
||||||
node_js:
|
node_js:
|
||||||
- 4
|
|
||||||
- 5
|
- 5
|
||||||
- 6
|
- 6
|
||||||
|
- 7
|
||||||
|
|
||||||
# Install a C++11 compatible compiler
|
# Install a C++11 compatible compiler
|
||||||
addons:
|
addons:
|
||||||
@ -47,6 +47,7 @@ git:
|
|||||||
# Cache dependencies
|
# Cache dependencies
|
||||||
cache:
|
cache:
|
||||||
pip: true
|
pip: true
|
||||||
|
yarn: true
|
||||||
directories:
|
directories:
|
||||||
- node_modules
|
- node_modules
|
||||||
|
|
||||||
@ -55,4 +56,4 @@ before_script:
|
|||||||
- pip install --user -r requirements.txt
|
- pip install --user -r requirements.txt
|
||||||
|
|
||||||
# Perform build and tests
|
# Perform build and tests
|
||||||
script: npm run build
|
script: yarn run build
|
||||||
|
@ -110,7 +110,7 @@
|
|||||||
<a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-icon md-content__edit">edit</a>
|
<a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-icon md-content__edit">edit</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if not "\x3ch1 id=" in page.content %}
|
{% if not "\x3ch1" in page.content %}
|
||||||
<h1>{{ page.title | default(config.site_name, true)}}</h1>
|
<h1>{{ page.title | default(config.site_name, true)}}</h1>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ page.content }}
|
{{ page.content }}
|
||||||
|
@ -25,10 +25,10 @@
|
|||||||
<li class="md-nav__item">
|
<li class="md-nav__item">
|
||||||
{% set toc_ = page.toc %}
|
{% set toc_ = page.toc %}
|
||||||
<input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="toc">
|
<input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="toc">
|
||||||
{% if "\x3ch1 id=" in page.content %}
|
{% if toc_ | first is defined %}
|
||||||
{% set toc_ = (toc_ | first).children %}
|
{% set toc_ = (toc_ | first).children %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if toc_ and (toc_ | first) %}
|
{% if toc_ | first is defined %}
|
||||||
<label class="md-nav__link md-nav__link--active" for="toc">
|
<label class="md-nav__link md-nav__link--active" for="toc">
|
||||||
{{ nav_item.title }}
|
{{ nav_item.title }}
|
||||||
</label>
|
</label>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<a href="{{ nav_item.url }}" title="{{ nav_item.title }}" class="md-nav__link md-nav__link--active">
|
<a href="{{ nav_item.url }}" title="{{ nav_item.title }}" class="md-nav__link md-nav__link--active">
|
||||||
{{ nav_item.title }}
|
{{ nav_item.title }}
|
||||||
</a>
|
</a>
|
||||||
{% if page.toc %}
|
{% if toc_ | first is defined %}
|
||||||
{% include "partials/toc.html" %}
|
{% include "partials/toc.html" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{% import "partials/language.html" as lang %}
|
{% import "partials/language.html" as lang %}
|
||||||
<nav class="md-nav md-nav--secondary">
|
<nav class="md-nav md-nav--secondary">
|
||||||
{% set toc_ = page.toc %}
|
{% set toc_ = page.toc %}
|
||||||
{% if "\x3ch1 id=" in page.content %}
|
{% if toc_ | first is defined and "\x3ch1 id=" in page.content %}
|
||||||
{% set toc_ = (toc_ | first).children %}
|
{% set toc_ = (toc_ | first).children %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if toc_ and (toc_ | first) %}
|
{% if toc_ | first is defined %}
|
||||||
<label class="md-nav__title" for="toc">{{ lang.t('toc.title') }}</label>
|
<label class="md-nav__title" for="toc">{{ lang.t('toc.title') }}</label>
|
||||||
<ul class="md-nav__list" data-md-scrollfix>
|
<ul class="md-nav__list" data-md-scrollfix>
|
||||||
{% for toc_item in toc_ %}
|
{% for toc_item in toc_ %}
|
||||||
|
@ -90,9 +90,9 @@
|
|||||||
"node-notifier": "^5.0.0",
|
"node-notifier": "^5.0.0",
|
||||||
"postcss-pseudo-classes": "^0.1.0",
|
"postcss-pseudo-classes": "^0.1.0",
|
||||||
"sauce-connect-launcher": "^1.2.0",
|
"sauce-connect-launcher": "^1.2.0",
|
||||||
"selenium-standalone": "^5.9.1",
|
"selenium-standalone": "^6.0.0",
|
||||||
"stylelint": "^7.7.1",
|
"stylelint": "^7.8.0",
|
||||||
"stylelint-config-standard": "^15.0.1",
|
"stylelint-config-standard": "^16.0.0",
|
||||||
"stylelint-order": "^0.2.2",
|
"stylelint-order": "^0.2.2",
|
||||||
"stylelint-scss": "^1.4.1",
|
"stylelint-scss": "^1.4.1",
|
||||||
"through2": "^2.0.3",
|
"through2": "^2.0.3",
|
||||||
|
@ -219,11 +219,11 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This is a nasty hack that checks whether the content contains
|
Hack: check whether the content contains a h1 headline. If it
|
||||||
a h1 headline. If it doesn't, the page title (or respectively
|
doesn't, the page title (or respectively site name) is used
|
||||||
site name) is used as the main headline.
|
as the main headline.
|
||||||
-->
|
-->
|
||||||
{% if not "\x3ch1 id=" in page.content %}
|
{% if not "\x3ch1" in page.content %}
|
||||||
<h1>{{ page.title | default(config.site_name, true)}}</h1>
|
<h1>{{ page.title | default(config.site_name, true)}}</h1>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -62,13 +62,13 @@
|
|||||||
<input class="md-toggle md-nav__toggle" data-md-toggle="toc"
|
<input class="md-toggle md-nav__toggle" data-md-toggle="toc"
|
||||||
type="checkbox" id="toc" />
|
type="checkbox" id="toc" />
|
||||||
|
|
||||||
<!-- Nasty hack - see partials/toc.html for more information -->
|
<!-- Hack: see partials/toc.html for more information -->
|
||||||
{% if "\x3ch1 id=" in page.content %}
|
{% if toc_ | first is defined %}
|
||||||
{% set toc_ = (toc_ | first).children %}
|
{% set toc_ = (toc_ | first).children %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<!-- Render table of contents, if not empty -->
|
<!-- Render table of contents, if not empty -->
|
||||||
{% if toc_ and (toc_ | first) %}
|
{% if toc_ | first is defined %}
|
||||||
<label class="md-nav__link md-nav__link--active" for="toc">
|
<label class="md-nav__link md-nav__link--active" for="toc">
|
||||||
{{ nav_item.title }}
|
{{ nav_item.title }}
|
||||||
</label>
|
</label>
|
||||||
@ -79,7 +79,7 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- Show table of contents -->
|
<!-- Show table of contents -->
|
||||||
{% if page.toc %}
|
{% if toc_ | first is defined %}
|
||||||
{% include "partials/toc.html" %}
|
{% include "partials/toc.html" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
|
@ -27,17 +27,17 @@
|
|||||||
{% set toc_ = page.toc %}
|
{% set toc_ = page.toc %}
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This is a nasty hack that checks whether the content contains a h1
|
Hack: check whether the content contains a h1 headline. If it does, the
|
||||||
headline. If it does, the top-level anchor must be skipped, since it would
|
top-level anchor must be skipped, since it would be redundant to the link
|
||||||
be redundant to the link to the current page that is located just above the
|
to the current page that is located just above the anchor. Therefore we
|
||||||
anchor. Therefore we directly continue with the children of the anchor.
|
directly continue with the children of the anchor.
|
||||||
-->
|
-->
|
||||||
{% if "\x3ch1 id=" in page.content %}
|
{% if toc_ | first is defined and "\x3ch1 id=" in page.content %}
|
||||||
{% set toc_ = (toc_ | first).children %}
|
{% set toc_ = (toc_ | first).children %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<!-- Render item list -->
|
<!-- Render item list -->
|
||||||
{% if toc_ and (toc_ | first) %}
|
{% if toc_ | first is defined %}
|
||||||
<label class="md-nav__title" for="toc">{{ lang.t('toc.title') }}</label>
|
<label class="md-nav__title" for="toc">{{ lang.t('toc.title') }}</label>
|
||||||
<ul class="md-nav__list" data-md-scrollfix>
|
<ul class="md-nav__list" data-md-scrollfix>
|
||||||
{% for toc_item in toc_ %}
|
{% for toc_item in toc_ %}
|
||||||
|
Loading…
Reference in New Issue
Block a user