squidfunk / mkdocs-material

Documentation that simply works
https://squidfunk.github.io/mkdocs-material/
MIT License
20.31k stars 3.48k forks source link

'mkdocs.theme.Theme object' has no attribute 'logo' #3432

Closed yongqilei closed 2 years ago

yongqilei commented 2 years ago

Contribution guidelines

I've found a bug and checked that ...

Description

I'm trying to build the mkdocs-material by both GitHub Actions and local command (mkdocs build -v), but I got error "'mkdocs.theme.Theme object' has no attribute 'logo'". You can refer [Actual Behavior] section for error details.

GitHub Actions yaml:

name: MkDocs Build

on:
  push:
    branches: 
      - master
  pull_request:
    branches:
      - master
  workflow_dispatch:

jobs:
  build:
    name: Eng Learning Page Build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
        with:
          python-version: 3.x
      - name: Install Python dependencies
        run: pip install -r requirements.txt
      - name: Install Node.js dependencies
        run: npm install .
      - run: pip install mkdocs-material 
      - name: Page Build
        run: |
          chmod +x ./scripts/build.sh && ./scripts/build.sh
          mkdocs build -v
      - name: Gulp minify
        run: npx gulp minify
      - name: Deploy to gh-pages
        if: ${{ github.event_name == 'push' }}
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./site
          force_orphan: true

You can check all the details in my Repo.

Could anyone help with my issue? Thank you so much!!!

Expected behaviour

Build pages successfully and push static page files to gh-pages branch.

Actual behaviour

I got same error on both local env and GitHub Actions.

Build pages with GitHub Actions:

DEBUG    -  Building theme template: 404.html
98
Traceback (most recent call last):
99
  File "/opt/hostedtoolcache/Python/3.10.1/x64/bin/mkdocs", line 8, in <module>
100
    sys.exit(cli())
101
  File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
102
    return self.main(*args, **kwargs)
103
  File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/click/core.py", line 1053, in main
104
    rv = self.invoke(ctx)
105
  File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
106
    return _process_result(sub_ctx.command.invoke(sub_ctx))
107
  File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
108
    return ctx.invoke(self.callback, **ctx.params)
109
  File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/click/core.py", line 754, in invoke
110
    return __callback(*args, **kwargs)
111
  File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/mkdocs/__main__.py", line 187, in build_command
112
    build.build(config.load_config(**kwargs), dirty=not clean)
113
  File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/mkdocs/commands/build.py", line 306, in build
114
    _build_theme_template(template, env, files, config, nav)
115
  File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/mkdocs/commands/build.py", line 111, in _build_theme_template
116
    output = _build_template(template_name, template, files, config, nav)
117
  File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/mkdocs/commands/build.py", line 90, in _build_template
118
    output = template.render(context)
119
  File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/jinja2/environment.py", line 1291, in render
120
    self.environment.handle_exception()
121
  File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/jinja2/environment.py", line 925, in handle_exception
122
    raise rewrite_traceback_stack(source=source)
123
  File "/home/runner/work/403unauthorized.github.io/403unauthorized.github.io/mkdocs-material/material/404.html", line 4, in top-level template code
124
    {% extends "base.html" %}
125
  File "/home/runner/work/403unauthorized.github.io/403unauthorized.github.io/mkdocs-material/material/base.html", line 125, in top-level template code
126
    {% block header %}
127
  File "/home/runner/work/403unauthorized.github.io/403unauthorized.github.io/mkdocs-material/material/base.html", line 126, in block 'header'
128
    {% include "partials/header.html" %}
129
  File "/home/runner/work/403unauthorized.github.io/403unauthorized.github.io/mkdocs-material/material/partials/header.html", line 9, in top-level template code
130
    {% if config.theme.logo.icon %}
131
  File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/jinja2/environment.py", line 474, in getattr
132
    return getattr(obj, attribute)
133
jinja2.exceptions.UndefinedError: 'mkdocs.theme.Theme object' has no attribute 'logo'
134
Error: Process completed with exit code 1.

Build pages using mkdocs build -v:

(base) ➜  403unauthorized.github.io git:(master) mkdocs build -v 
DEBUG    -  Loading configuration file:
            /Users/torres.lei/Documents/blog/403unauthorized.github.io/mkdocs.yml
DEBUG    -  Config value: 'config_file_path' =
            '/Users/torres.lei/Documents/blog/403unauthorized.github.io/mkdocs.yml'
DEBUG    -  Config value: 'site_name' = 'Eng Learning'
DEBUG    -  Config value: 'nav' = [{'简介': [{'Getting Started': 'index.md'}, {'关于我':
            'about.md'}]}, {'Java': [{'Java简介': 'java/index.md'}, {'Synchronized 学习笔记':
            'java/synchronized.md'}, {'Volatile 学习笔记': 'java/volatile.md'}, {'JVM': [{'Java
            垃圾收集器': 'java/garbage-collector.md'}, {'JVM 内存区域学习笔记': 'java/jvm-breakdown.md'}]},
            {'Spring': [{'Spring Cloud Ribbon': 'java/spring-cloud-ribbon.md'}]}]}, {'云原生':
            [{'云原生简介': 'cloud/index.md'}, {'Golang': [{'Golang基础知识':
            'cloud/golang-basics.md'}]}, {'Kubernetes': [{'Kubernetes on CentOS':
            'cloud/kubernetes-on-centos.md'}, {'在CentOS上安装K8S':
            'cloud/kubernetes-installation-on-centos.md'}]}]}, {'算法': [{'算法系列':
            'algo/index.md'}, {'LeetCode': [{'Daily': [{'2022/01/04 - 913. 猫和老鼠':
            'algo/leetcode/daily/2022-01-04.md'}]}]}]}]
DEBUG    -  Config value: 'pages' = None
DEBUG    -  Config value: 'site_url' = 'https://403unauthorized.github.io/'
DEBUG    -  Config value: 'site_description' = 'Eng Learning 是我用来整合知识的一个站点,主要面向编程知识。'
DEBUG    -  Config value: 'site_author' = 'Torres Lei'
DEBUG    -  Config value: 'theme' = Theme(name='None',
            dirs=['/Users/torres.lei/Documents/blog/403unauthorized.github.io/mkdocs-material/material',
            '/opt/anaconda3/lib/python3.8/site-packages/mkdocs/templates'],
            static_templates=['sitemap.xml', '404.html'], locale=Locale('en'), language='zh',
            include_search_page=False, search_index_only=True, palette=[{'sheme': 'default',
            'primary': 'indigo', 'accent': 'indigo', 'toggle': {'icon':
            'material/toggle-switch', 'name': 'Switch to dark mode'}}, {'scheme': 'slate',
            'primary': 'red', 'accent': 'red', 'toggle': {'icon':
            'material/toggle-switch-off-outline', 'name': 'Switch to light mode'}}],
            font={'text': 'Fira Sans', 'code': 'Fira Mono'}, features=['search.suggest',
            'search.highlight', 'search.share', 'navigation.tabs', 'navigation.instant',
            'navigation.tracking', 'navigation.top'], icon={'repo':
            'fontawesome/brands/github-alt', 'logo': 'material/book-education-outline',
            'admonition': {'note': 'octicons/tag-16', 'abstract': 'octicons/checklist-16',
            'info': 'octicons/info-16', 'tip': 'octicons/squirrel-16', 'success':
            'octicons/check-16', 'question': 'octicons/question-16', 'warning':
            'octicons/alert-16', 'failure': 'octicons/x-circle-16', 'danger': 'octicons/zap-16',
            'bug': 'octicons/bug-16', 'example': 'octicons/beaker-16', 'quote':
            'octicons/quote-16'}}, favicon='favicon.ico')
DEBUG    -  Config value: 'docs_dir' =
            '/Users/torres.lei/Documents/blog/403unauthorized.github.io/docs'
DEBUG    -  Config value: 'site_dir' =
            '/Users/torres.lei/Documents/blog/403unauthorized.github.io/site'
DEBUG    -  Config value: 'copyright' = 'Copyright &copy; 2021 - 2022 Eng Learning by Torres'
DEBUG    -  Config value: 'google_analytics' = None
DEBUG    -  Config value: 'dev_addr' = Address(host='127.0.0.1', port=8000)
DEBUG    -  Config value: 'use_directory_urls' = True
DEBUG    -  Config value: 'repo_url' =
            'https://github.com/403Unauthorized/403unauthorized.github.io/'
DEBUG    -  Config value: 'repo_name' = 'Programming Space'
DEBUG    -  Config value: 'edit_uri' = 'edit/master/docs/'
DEBUG    -  Config value: 'extra_css' = []
DEBUG    -  Config value: 'extra_javascript' = []
DEBUG    -  Config value: 'extra_templates' = []
DEBUG    -  Config value: 'markdown_extensions' = ['toc', 'tables', 'fenced_code', 'admonition',
            'codehilite', 'def_list', 'footnotes', 'meta', 'pymdownx.arithmatex',
            'pymdownx.caret', 'pymdownx.critic', 'pymdownx.details', 'pymdownx.emoji',
            'pymdownx.highlight', 'pymdownx.inlinehilite', 'pymdownx.keys',
            'pymdownx.magiclink', 'pymdownx.mark', 'pymdownx.snippets', 'pymdownx.progressbar',
            'pymdownx.smartsymbols', 'pymdownx.superfences', 'pymdownx.tasklist',
            'pymdownx.tilde']
DEBUG    -  Config value: 'mdx_configs' = {'codehilite': {'guess_lang': False, 'linenums':
            True}, 'toc': {'permalink': True}, 'pymdownx.emoji': {'emoji_generator': <function
            to_svg at 0x7fc016538ca0>}, 'pymdownx.highlight': {'linenums': True},
            'pymdownx.superfences': {'custom_fences': [{'name': 'mermaid', 'class': 'mermaid',
            'format': <function fence_code_format at 0x7fc01653cb80>}]}, 'pymdownx.tasklist':
            {'custom_checkbox': True}}
DEBUG    -  Config value: 'strict' = False
DEBUG    -  Config value: 'remote_branch' = 'gh-pages'
DEBUG    -  Config value: 'remote_name' = 'origin'
DEBUG    -  Config value: 'extra' = {}
DEBUG    -  Config value: 'plugins' = PluginCollection([('search',
            <mkdocs.contrib.search.SearchPlugin object at 0x7fc0167b5160>)])
INFO     -  Cleaning site directory
INFO     -  Building documentation to directory:
            /Users/torres.lei/Documents/blog/403unauthorized.github.io/site
DEBUG    -  Looking for translations for locale 'en'
DEBUG    -  No translations found here:
            '/opt/anaconda3/lib/python3.8/site-packages/mkdocs/templates/locales'
DEBUG    -  No translations found here:
            '/Users/torres.lei/Documents/blog/403unauthorized.github.io/mkdocs-material/material/locales'
DEBUG    -  Reading markdown pages.
DEBUG    -  Reading: index.md
DEBUG    -  Reading: about.md
DEBUG    -  Reading: algo/index.md
DEBUG    -  Reading: algo/leetcode/daily/2022-01-04.md
DEBUG    -  Reading: cloud/index.md
DEBUG    -  Reading: cloud/golang-basics.md
DEBUG    -  Reading: cloud/kubernetes-installation-on-centos.md
DEBUG    -  Reading: cloud/kubernetes-on-centos.md
DEBUG    -  Reading: java/index.md
DEBUG    -  Reading: java/garbage-collector.md
DEBUG    -  Reading: java/jvm-breakdown.md
DEBUG    -  Reading: java/spring-cloud-ribbon.md
DEBUG    -  Reading: java/synchronized.md
DEBUG    -  Reading: java/volatile.md
DEBUG    -  Copying static assets.
DEBUG    -  Copying media file: 'favicon-150x150.png'
DEBUG    -  Copying media file: 'favicon.ico'
DEBUG    -  Copying media file: '_static/css/extra.css'
DEBUG    -  Copying media file: '_static/css/han.css'
DEBUG    -  Copying media file: '_static/js/extra.js'
DEBUG    -  Copying media file: 'java/images/gc/java_gc_1.png'
DEBUG    -  Copying media file: 'java/images/gc/java_gc_2.png'
DEBUG    -  Copying media file: 'java/images/gc/java_gc_3.png'
DEBUG    -  Copying media file: 'java/images/gc/java_gc_4.png'
DEBUG    -  Copying media file: 'java/images/gc/java_gc_5.png'
DEBUG    -  Copying media file: 'java/images/gc/java_gc_6.png'
DEBUG    -  Copying media file: 'java/images/gc/java_gc_7.png'
DEBUG    -  Copying media file: 'java/images/gc/java_gc_8.png'
DEBUG    -  Copying media file: 'java/images/jvm/jvm-breakdown-2.png'
DEBUG    -  Copying media file: 'java/images/jvm/jvm-memory-area.png'
DEBUG    -  Copying media file: 'java/images/spring-cloud-ribbon/ribbon1.png'
DEBUG    -  Copying media file: 'java/images/spring-cloud-ribbon/ribbon2.png'
DEBUG    -  Copying media file: 'java/images/spring-cloud-ribbon/ribbon3.png'
DEBUG    -  Copying media file: 'java/images/spring-cloud-ribbon/ribbon4.png'
DEBUG    -  Copying media file: 'java/images/spring-cloud-ribbon/ribbon5.png'
DEBUG    -  Copying media file: 'java/images/synchronized/java_syn_1.png'
DEBUG    -  Copying media file: 'java/images/synchronized/java_syn_2.png'
DEBUG    -  Copying media file: 'java/images/synchronized/java_syn_3.png'
DEBUG    -  Copying media file: 'java/images/synchronized/java_syn_4.png'
DEBUG    -  Copying media file: 'assets/fonts/font-awesome.css'
DEBUG    -  Copying media file: 'assets/fonts/material-icons.css'
DEBUG    -  Copying media file: 'assets/fonts/specimen/FontAwesome.ttf'
DEBUG    -  Copying media file: 'assets/fonts/specimen/FontAwesome.woff'
DEBUG    -  Copying media file: 'assets/fonts/specimen/FontAwesome.woff2'
DEBUG    -  Copying media file: 'assets/fonts/specimen/MaterialIcons-Regular.ttf'
DEBUG    -  Copying media file: 'assets/fonts/specimen/MaterialIcons-Regular.woff'
DEBUG    -  Copying media file: 'assets/fonts/specimen/MaterialIcons-Regular.woff2'
DEBUG    -  Copying media file: 'assets/images/favicon.png'
DEBUG    -  Copying media file: 'assets/images/icons/bitbucket.1b09e088.svg'
DEBUG    -  Copying media file: 'assets/images/icons/github.f0b8504a.svg'
DEBUG    -  Copying media file: 'assets/images/icons/gitlab.6dd19c00.svg'
DEBUG    -  Copying media file: 'assets/javascripts/application.ce5eb668.js'
DEBUG    -  Copying media file: 'assets/javascripts/modernizr.27508f0e.js'
DEBUG    -  Copying media file: 'assets/stylesheets/application-palette.a8b3c06d.css'
DEBUG    -  Copying media file: 'assets/stylesheets/application.30686662.css'
DEBUG    -  Building theme template: sitemap.xml
DEBUG    -  Gzipping template: sitemap.xml
DEBUG    -  Building theme template: 404.html
Traceback (most recent call last):
  File "/opt/anaconda3/bin/mkdocs", line 8, in <module>
    sys.exit(cli())
  File "/opt/anaconda3/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/opt/anaconda3/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/opt/anaconda3/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/anaconda3/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/anaconda3/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/opt/anaconda3/lib/python3.8/site-packages/mkdocs/__main__.py", line 187, in build_command
    build.build(config.load_config(**kwargs), dirty=not clean)
  File "/opt/anaconda3/lib/python3.8/site-packages/mkdocs/commands/build.py", line 306, in build
    _build_theme_template(template, env, files, config, nav)
  File "/opt/anaconda3/lib/python3.8/site-packages/mkdocs/commands/build.py", line 111, in _build_theme_template
    output = _build_template(template_name, template, files, config, nav)
  File "/opt/anaconda3/lib/python3.8/site-packages/mkdocs/commands/build.py", line 90, in _build_template
    output = template.render(context)
  File "/opt/anaconda3/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/opt/anaconda3/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/opt/anaconda3/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "/Users/torres.lei/Documents/blog/403unauthorized.github.io/mkdocs-material/material/404.html", line 4, in top-level template code
    {% extends "base.html" %}
  File "/Users/torres.lei/Documents/blog/403unauthorized.github.io/mkdocs-material/material/base.html", line 125, in top-level template code
    {% block header %}
  File "/Users/torres.lei/Documents/blog/403unauthorized.github.io/mkdocs-material/material/base.html", line 126, in block "header"
    {% include "partials/header.html" %}
  File "/Users/torres.lei/Documents/blog/403unauthorized.github.io/mkdocs-material/material/partials/header.html", line 9, in top-level template code
    {% if config.theme.logo.icon %}
  File "/opt/anaconda3/lib/python3.8/site-packages/jinja2/environment.py", line 471, in getattr
    return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'mkdocs.theme.Theme object' has no attribute 'logo'

Steps to reproduce

Please refer to GitHub Actions workflow file I mentioned in [Description] section.

It will execute following shell scripts.

build.sh:

#!/usr/bin/env bash
# Push HTML files to gh-pages automatically.

# Fill this out with the correct org/repo
AUTHOR=Torres.Lei
REPO=403unauthorized.github.io
# This probably should match an email for one of your users.
EMAIL=leiyongqi1026@gmail.com
INSTALL_THEME='./scripts/install_theme.sh'

set -e

chmod +x $INSTALL_THEME && $INSTALL_THEME

install_theme.sh:

#!/usr/bin/env bash

set -e

THEME_NAME="mkdocs-material"
if [ ! -d "$THEME_NAME" ] ; then
  git clone --depth=1 ${THEME_REPO:-"https://github.com/OI-wiki/mkdocs-material.git"} "$THEME_NAME"
fi

Package versions

(base) ➜  ~ python --version                           
Python 3.8.8
(base) ➜  ~ mkdocs --version
mkdocs, version 1.2.3 from /opt/anaconda3/lib/python3.8/site-packages/mkdocs (Python 3.8)
(base) ➜  ~ pip show mkdocs-material | grep -E ^Version
Version: 8.1.4

Configuration

Following is content of mkdocs.yml

# Site Information
site_name: Eng Learning
site_description: Eng Learning 是我用来整合知识的一个站点,主要面向编程知识。
site_author: Torres Lei
site_url: https://403unauthorized.github.io

# Repository
repo_name: 'Programming Space'
repo_url: https://github.com/403Unauthorized/403unauthorized.github.io

# Copyright
copyright: 'Copyright &copy; 2021 - 2022 Eng Learning by Torres'

# Contents
nav:
  - 简介:
    - Getting Started: index.md
    - 关于我: about.md
  - Java:
    - Java简介: java/index.md
    - Synchronized 学习笔记: java/synchronized.md
    - Volatile 学习笔记: java/volatile.md
    - JVM:
      - Java 垃圾收集器: java/garbage-collector.md
      - JVM 内存区域学习笔记: java/jvm-breakdown.md
    - Spring:
      - Spring Cloud Ribbon: java/spring-cloud-ribbon.md
  - 云原生:
    - 云原生简介: cloud/index.md
    - Golang:
      - Golang基础知识: cloud/golang-basics.md
    - Kubernetes:
      - Kubernetes on CentOS: cloud/kubernetes-on-centos.md
      - 在CentOS上安装K8S: cloud/kubernetes-installation-on-centos.md
  - 算法:
    - 算法系列: algo/index.md
    - LeetCode:
      - Daily:
        - 2022/01/04 - 913. 猫和老鼠: algo/leetcode/daily/2022-01-04.md

# Plugins
plugins:
  - search

# Theme
theme:
  name: null
  language: zh
  custom_dir: 'mkdocs-material/material'
  static_templates:
    - 404.html
  include_search_page: false
  search_index_only: true
  palette:
    - sheme: default
      primary: indigo
      accent: indigo
      toggle:
        icon: material/toggle-switch
        name: Switch to dark mode
    - scheme: slate
      primary: red
      accent: red
      toggle:
        icon: material/toggle-switch-off-outline
        name: Switch to light mode
  font:
    text: 'Fira Sans'
    code: 'Fira Mono'
  features:
    - search.suggest
    - search.highlight
    - search.share
    - navigation.tabs
    - navigation.instant
    - navigation.tracking
    - navigation.top
  icon:
    repo: fontawesome/brands/github-alt
    logo: material/book-education-outline
    admonition:
      note: octicons/tag-16
      abstract: octicons/checklist-16
      info: octicons/info-16
      tip: octicons/squirrel-16
      success: octicons/check-16
      question: octicons/question-16
      warning: octicons/alert-16
      failure: octicons/x-circle-16
      danger: octicons/zap-16
      bug: octicons/bug-16
      example: octicons/beaker-16
      quote: octicons/quote-16
  favicon: 'favicon.ico'

# Extensions
markdown_extensions:
  - admonition
  - codehilite:
      guess_lang: false
      linenums: true
  - def_list
  - footnotes
  - meta
  - toc:
      permalink: true
  - pymdownx.arithmatex
  - pymdownx.caret
  - pymdownx.critic
  - pymdownx.details
  - pymdownx.emoji:
      emoji_generator: !!python/name:pymdownx.emoji.to_svg
  - pymdownx.highlight:
      linenums: true
  - pymdownx.inlinehilite
  - pymdownx.keys
  - pymdownx.magiclink
  - pymdownx.mark
  - pymdownx.snippets
  - pymdownx.progressbar
  - pymdownx.smartsymbols
  - pymdownx.superfences:
      custom_fences:
        - name: mermaid
          class: mermaid
          format: !!python/name:pymdownx.superfences.fence_code_format
  - pymdownx.tasklist:
      custom_checkbox: true
  - pymdownx.tilde

System information

squidfunk commented 2 years ago

Thanks for reporting.

{% if config.theme.logo.icon %}

From the stack trace, I can see that the header partial is outdated. Please make sure that when using the theme from git that you're on the latest HEAD. When upgrading, it's always a good idea to check out the upgrade guide. The change was introduced in v5 almost two years ago. An excerpt from the upgrade guide:

@@ -4,51 +4,43 @@
 <header class="md-header" data-md-component="header">
-  <nav class="md-header-nav md-grid">
-    <div class="md-flex">
-      <div class="md-flex__cell md-flex__cell--shrink">
-        <a href="{{ config.site_url | default(nav.homepage.url, true) | url }}" title="{{ config.site_name }}" aria-label="{{ config.site_name }}" class="md-header-nav__button md-logo">
-          {% if config.theme.logo.icon %}
-            <i class="md-icon">{{ config.theme.logo.icon }}</i>
-          {% else %}
-            <img alt="logo" src="{{ config.theme.logo | url }}" width="24" height="24">
-          {% endif %}
-        </a>
-      </div>
-      <div class="md-flex__cell md-flex__cell--shrink">
-        <label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
-      </div>
-      <div class="md-flex__cell md-flex__cell--stretch">
-        <div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
-          {% if config.site_name == page.title %}
-            {{ config.site_name }}
-          {% else %}
-            <span class="md-header-nav__topic">
-              {{ config.site_name }}
-            </span>
-            <span class="md-header-nav__topic">
-              {% if page and page.meta and page.meta.title %}
-                {{ page.meta.title }}
-              {% else %}
-                {{ page.title }}
-              {% endif %}
-            </span>
-          {% endif %}
+  <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 }}" 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">
+      {% include ".icons/material/menu" ~ ".svg" %}
+    </label>
+    <div class="md-header-nav__title" data-md-component="header-title">
+      {% if config.site_name == page.title %}
+        <div class="md-header-nav__ellipsis md-ellipsis">
+          {{ config.site_name }}
         </div>
-      </div>
-      <div class="md-flex__cell md-flex__cell--shrink">
-        {% if "search" in config["plugins"] %}
-          <label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
-          {% include "partials/search.html" %}
-        {% endif %}
-      </div>
-      {% if config.repo_url %}
-        <div class="md-flex__cell md-flex__cell--shrink">
-          <div class="md-header-nav__source">
-            {% include "partials/source.html" %}
-          </div>
+      {% else %}
+        <div class="md-header-nav__ellipsis">
+          <span class="md-header-nav__topic md-ellipsis">
+            {{ config.site_name }}
+          </span>
+          <span class="md-header-nav__topic md-ellipsis">
+            {% if page and page.meta and page.meta.title %}
+              {{ page.meta.title }}
+            {% else %}
+              {{ page.title }}
+            {% endif %}
+          </span>
         </div>
       {% endif %}
     </div>
+    {% if "search" in config["plugins"] %}
+      <label class="md-header-nav__button md-icon" for="__search">
+        {% include ".icons/material/magnify.svg" %}
+      </label>
+      {% include "partials/search.html" %}
+    {% endif %}
+    {% if config.repo_url %}
+      <div class="md-header-nav__source">
+        {% include "partials/source.html" %}
+      </div>
+    {% endif %}
   </nav>
 </header>
squidfunk commented 2 years ago

Since there's nothing to do on our side, I'm closing this issue.