mkdocs导航标题与页面标题不同

问题描述 投票:1回答:1

我的mkdocs.yml文件具有nav标题,在左侧导航中这些标题被缩短为仅适合1行,并且我希望.md Markdown page标题为完整标题。

例如,当我的mkdocs.yml文件包含:

nav:
- BD, ML, DS: Big_Data,_Machine_Learning,_Data_Science.md
- AI, VI: Artificial_Intelligence,_Video_Intelligence.md

我希望.md页面标题为:

Big Data, Machine Learning, and Data Science

...代替复制/使用mkdocs.yml导航标题:

BD, ML, DS

[当我将Markdown页面标题添加到# Big Data...文件的第一行(.md)时,我同时获得了我想要的页面标题继承的mkdocs.yml页面标题:

BD, ML, DS
7 min (1,939 words)
Big Data, Machine Learning, and Data Science

似乎答案是在mkdocs.yml文件中指定了不同的/秒的“页面显示”名称,但是许多Google搜索都没有结果。

您还尝试或听说过哪些其他方法?谢谢!

markdown github-flavored-markdown mkdocs
1个回答
0
投票

您可以在页面iself中添加title。从docs

---
title: My Document
summary: A brief description of my document.
authors:
    - Waylan Limberg
    - Tom Christie
date: 2018-07-10
some_url: https://example.com
---
This is the first paragraph of the document.
© www.soinside.com 2019 - 2024. All rights reserved.