mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-28 09:20:52 +01:00
Fixed relative homepage links for nested pages when building locally
This commit is contained in:
parent
d7ce2e9040
commit
48b4120b8f
@ -2,8 +2,8 @@
|
||||
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" %}
|
||||
{% if not config.use_directory_urls and site_url[0] == site_url[-1] == "." %}
|
||||
{% set site_url = site_url ~ "/index.html" | url %}
|
||||
{% endif %}
|
||||
<header class="md-header" data-md-component="header">
|
||||
<nav class="md-header-nav md-grid" aria-label="{{ lang.t('header.title') }}">
|
||||
|
@ -2,7 +2,7 @@
|
||||
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 == "." %}
|
||||
{% if not config.use_directory_urls and site_url[0] == site_url[-1] == "." %}
|
||||
{% 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">
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
<!-- Mitigate bug: https://github.com/mkdocs/mkdocs/issues/2191 -->
|
||||
{% 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" %}
|
||||
{% if not config.use_directory_urls and site_url[0] == site_url[-1] == "." %}
|
||||
{% set site_url = site_url ~ "/index.html" | url %}
|
||||
{% endif %}
|
||||
|
||||
<!-- Application header -->
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
<!-- Mitigate bug: https://github.com/mkdocs/mkdocs/issues/2191 -->
|
||||
{% set site_url = config.site_url | default(nav.homepage.url, true) | url %}
|
||||
{% if not config.use_directory_urls and site_url == "." %}
|
||||
{% if not config.use_directory_urls and site_url[0] == site_url[-1] == "." %}
|
||||
{% set site_url = site_url ~ "/index.html" %}
|
||||
{% endif %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user