mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed site_url (link behind home button) for usage from file://
This commit is contained in:
parent
b3271bab9f
commit
454339bd35
@ -1,9 +1,13 @@
|
||||
{#-
|
||||
This file was automatically generated - do not edit
|
||||
-#}
|
||||
{% set site_url = config.site_url | default(nav.homepage.url, true) | url %}
|
||||
{% if not config.use_directory_urls and site_url == "." %}
|
||||
{% set site_url = site_url ~ "/index.html" %}
|
||||
{% endif %}
|
||||
<header class="md-header" data-md-component="header">
|
||||
<nav class="md-header-nav md-grid" aria-label="{{ lang.t('header.title') }}">
|
||||
<a href="{{ config.site_url | default(nav.homepage.url, true) | url }}" title="{{ config.site_name | e }}" class="md-header-nav__button md-logo" aria-label="{{ config.site_name }}">
|
||||
<a href="{{ site_url }}" title="{{ config.site_name | e }}" class="md-header-nav__button md-logo" aria-label="{{ config.site_name }}">
|
||||
{% include "partials/logo.html" %}
|
||||
</a>
|
||||
<label class="md-header-nav__button md-icon" for="__drawer">
|
||||
|
@ -1,9 +1,13 @@
|
||||
{#-
|
||||
This file was automatically generated - do not edit
|
||||
-#}
|
||||
{% set site_url = config.site_url | default(nav.homepage.url, true) | url %}
|
||||
{% if not config.use_directory_urls and site_url == "." %}
|
||||
{% set site_url = site_url ~ "/index.html" %}
|
||||
{% endif %}
|
||||
<nav class="md-nav md-nav--primary" aria-label="{{ lang.t('nav.title') }}" data-md-level="0">
|
||||
<label class="md-nav__title" for="__drawer">
|
||||
<a href="{{ config.site_url | default(nav.homepage.url, true) | url }}" title="{{ config.site_name | e }}" class="md-nav__button md-logo" aria-label="{{ config.site_name }}">
|
||||
<a href="{{ site_url }}" title="{{ config.site_name | e }}" class="md-nav__button md-logo" aria-label="{{ config.site_name }}">
|
||||
{% include "partials/logo.html" %}
|
||||
</a>
|
||||
{{ config.site_name }}
|
||||
|
@ -20,6 +20,12 @@
|
||||
IN THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- Determine site url to mitigate a MkDocs bugs -->
|
||||
{% set site_url = config.site_url | default(nav.homepage.url, true) | url %}
|
||||
{% if not config.use_directory_urls and site_url == "." %}
|
||||
{% set site_url = site_url ~ "/index.html" %}
|
||||
{% endif %}
|
||||
|
||||
<!-- Application header -->
|
||||
<header class="md-header" data-md-component="header">
|
||||
|
||||
@ -28,7 +34,7 @@
|
||||
|
||||
<!-- Link to home -->
|
||||
<a
|
||||
href="{{ config.site_url | default(nav.homepage.url, true) | url }}"
|
||||
href="{{ site_url }}"
|
||||
title="{{ config.site_name | e }}"
|
||||
class="md-header-nav__button md-logo"
|
||||
aria-label="{{ config.site_name }}"
|
||||
|
@ -20,6 +20,12 @@
|
||||
IN THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- Determine site url to mitigate a MkDocs bugs -->
|
||||
{% set site_url = config.site_url | default(nav.homepage.url, true) | url %}
|
||||
{% if not config.use_directory_urls and site_url == "." %}
|
||||
{% set site_url = site_url ~ "/index.html" %}
|
||||
{% endif %}
|
||||
|
||||
<!-- Main navigation -->
|
||||
<nav
|
||||
class="md-nav md-nav--primary"
|
||||
@ -30,7 +36,7 @@
|
||||
<!-- Site title -->
|
||||
<label class="md-nav__title" for="__drawer">
|
||||
<a
|
||||
href="{{ config.site_url | default(nav.homepage.url, true) | url }}"
|
||||
href="{{ site_url }}"
|
||||
title="{{ config.site_name | e }}"
|
||||
class="md-nav__button md-logo"
|
||||
aria-label="{{ config.site_name }}"
|
||||
|
Loading…
Reference in New Issue
Block a user