Follow @Wcowin on
Bilibili and
Twitter

# 添加顶部公告栏

docs/overrides下新建main.html ，针对main.html文件
树状结构如下:

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15

    $ tree -a
    .
    ├── .github
    │   ├── .DS_Store
    │   └── workflows
    │       └── PublishMySite.yml
    ├── docs
    │   └── index.md
    │   └──overrides
    │       └──assets
    │       └──main.html
    │       └──partials
    │          └──comments.html
    │
    └── mkdocs.yml

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27

    {#-
        This file was automatically generated - do not edit
      -#}
      {% extends "base.html" %}
      {% block extrahead %}
        <link rel="stylesheet" href="{{ 'assets/stylesheets/custom.00c04c01.min.css' | url }}">
      {% endblock %}
      {% block announce %}
         Follow <strong>@Wcowin</strong> on
        <a rel="me" href="https://space.bilibili.com/1407028951?spm_id_from=333.1007.0.0">
          <span class="twemoji bilibili">
            {% include ".icons/fontawesome/brands/bilibili.svg" %}
          </span>
          <strong>Bilibili</strong>
        </a>
        and
        <a href="https://twitter.com/Wcowin_">
          <span class="twemoji twitter">
            {% include ".icons/fontawesome/brands/twitter.svg" %}
          </span>
          <strong>Twitter</strong>
        </a>
      {% endblock %}
      {% block scripts %}
        {{ super() }}
        <script src="{{ 'assets/javascripts/custom.9458f965.min.js' | url }}"></script>
      {% endblock %}

自行修改即可

2024-04-22
GitHub
此页面有帮助吗？
谢谢你的反馈！
Thanks for your feedback! Help us improve this page by using our feedback form.