Skip to content

Conversation

@zastrowm
Copy link
Member

Description

I'm incrementally working towards getting our docs working with astro.build - to do so markdown files need a title front-matter.

Currently, mkdocs does this to derive the title:

The "title" to use for the document.

MkDocs will attempt to determine the title of a document in the following ways, in order:

  1. A title defined in the nav configuration setting for a document.
  2. A title defined in the title meta-data key of a document.
  3. A level 1 Markdown header on the first line of the document body.
    (Setext-style headers are supported only since MkDocs 1.5.)
  4. The filename of a document.

Upon finding a title for a page, MkDoc does not continue checking any additional sources in the above list.

However, astro.build desires the title to be in the front-matter; for compatibility with both, add the title from the nav and add it as a frontmatter meta property. Also added a test to enforce this for now

Type of Change

  • New content addition

Motivation and Context

Incrementally let's docs work for both astro.build and mkdocs

Checklist

  • I have read the CONTRIBUTING document
  • My changes follow the project's documentation style
  • I have tested the documentation locally using mkdocs serve
  • Links in the documentation are valid and working
  • Images/diagrams are properly sized and formatted
  • All new and existing tests pass

Additional Notes

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

As part of the site revamp CMS (astro.build) we need titles on each page
@zastrowm zastrowm marked this pull request as ready for review November 1, 2025 21:28
uses: actions/checkout@v4
- name: Install dependencies
run: |
pip install .
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +1 to +3
---
title: Welcome
---
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the readme need a frontmatter? Is this actually included in the docs?

I think we should only be checking for files under docs

@@ -1,3 +1,6 @@
---
title: Multiagent
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
title: Multiagent
title: Multi-agent

---
title: Fireworks AI
---
# FireworksAI
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a space here or in the above title?

@@ -1,3 +1,6 @@
---
title: Amazon AgentCore Memory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it matter if this doesnt match the below top-level header?

@@ -1,3 +1,6 @@
---
title: Overview
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can/should two pages have the same title?

@zastrowm zastrowm closed this Nov 6, 2025
@zastrowm
Copy link
Member Author

zastrowm commented Nov 6, 2025

I misunderstood what title is doing and need to re-think the approach here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants