Added "View as markdown" button#3161
Open
mnocon wants to merge 23 commits into
Open
Conversation
|
Contributor
Contributor
Author
|
I've chosen this implementation based on other docs, which is (quickly) becoming the norm. Other pages using this approach of "buttons under h1":
As the number of action grows, they start using dropdowns:
As we only have 3 buttons right now - I'd keep this as is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




This PR adds support for https://llmstxt.org/ (tool helping AI agents navigate webpages), and introduces a Markdown version of the doc.
How it looks:
The "View on GitHub" button is replaced by:
Why Markdown version of the doc, is the content on GitHub not enough?
No, because the macros we use (for example, embedding files) make the content not readable.
Compare:
The output Markdown contains the full code sample, making it easier for the AI agents to understand what's going on.
For more example see the list of cases I had to cover below.
LLMS.txt files
llms.txt file
llms-full.txt file
Pages can be excluded from this by marking them with
exclude_from_llmstxt.The content of these files is autogenerated by
mkdocs buildis run - no manual changes needed.For now, HTML files are excluded from this list - I want to tackle API References in a follow-up.
Notes
Release notes page:
HTML: https://ez-systems-developer-documentation--3161.com.readthedocs.build/en/3161/release_notes/ibexa_dxp_v5.0/
Markdown: https://ez-systems-developer-documentation--3161.com.readthedocs.build/en/3161/release_notes/ibexa_dxp_v5.0/index.md (supports badges)
Exclusion of Personalization
Personalization pages are excluded from this solution.
Example page: https://ez-systems-developer-documentation--3161.com.readthedocs.build/en/3161/personalization/personalization/
Image alt text
AI agents cannot see the images, similarly as people using screen readers.
HTML: https://ez-systems-developer-documentation--3161.com.readthedocs.build/en/3161/infrastructure_and_maintenance/request_lifecycle/
Markdown: https://ez-systems-developer-documentation--3161.com.readthedocs.build/en/3161/infrastructure_and_maintenance/request_lifecycle/index.md
*[Image: Simplified request lifecycle flowchart]*Absolute vs relative urls
This is something I'm still considering - I've went with absolute URLs, as these fill safer, but they use more token space of the agents.
Example page with absolute linls: https://ez-systems-developer-documentation--3161.com.readthedocs.build/en/3161/discounts/discounts/index.md
Admonition boxes
Converted to blockquotes.
HTML: https://ez-systems-developer-documentation--3161.com.readthedocs.build/en/3161/infrastructure_and_maintenance/background_tasks/#start-worker
Markdown: https://ez-systems-developer-documentation--3161.com.readthedocs.build/en/3161/infrastructure_and_maintenance/background_tasks/index.md
Tabs
Example:
HTML https://ez-systems-developer-documentation--3161.com.readthedocs.build/en/3161/getting_started/requirements/
Markdown: https://ez-systems-developer-documentation--3161.com.readthedocs.build/en/3161/getting_started/requirements/index.md
Tables
Tables actually look great 😄 The only problem is tables where a call contains a
|: This will be fixed once we start using markdownlint (one of the PR fixes this) - we can't use the|symbol within tables, as it breaks table rendering.For tables with linebreaks within cells, a comma is used instead.
Examples:
HTML: https://ez-systems-developer-documentation--3161.com.readthedocs.build/en/3161/ibexa_products/editions/
Markdown: https://ez-systems-developer-documentation--3161.com.readthedocs.build/en/3161/ibexa_products/editions/index.md
With linebreaks:
HTML: https://ez-systems-developer-documentation--3161.com.readthedocs.build/en/3161/api/event_reference/content_events/
Markdown: https://ez-systems-developer-documentation--3161.com.readthedocs.build/en/3161/api/event_reference/content_events/index.md
Note the broken row for
BeforePublishVersionEvent- this must be fixed in the Markdown source (I do it in one of the Markdownlint PRs).Cards macro
Converted to a list of links:
HTML: https://ez-systems-developer-documentation--3161.com.readthedocs.build/en/3161/ibexa_products/editions/
Markdown: https://ez-systems-developer-documentation--3161.com.readthedocs.build/en/3161/ibexa_products/editions/index.md
Lists numbering
Example: https://ez-systems-developer-documentation--3161.com.readthedocs.build/en/3161/infrastructure_and_maintenance/clustering/clustering_with_ddev/index.md
Edition pills
In content (inline):
Mutliple badges: https://ez-systems-developer-documentation--3161.com.readthedocs.build/en/3161/commerce/shopping_list/shopping_list_guide/index.md
Single badge:
HTML: https://ez-systems-developer-documentation--3161.com.readthedocs.build/en/3161/update_and_migration/from_5.0/update_from_5.0/#form-builder-performance-fix-missing-indexes-on-form-submission-data
Markdown: https://ez-systems-developer-documentation--3161.com.readthedocs.build/en/3161/update_and_migration/from_5.0/update_from_5.0/index.md
Release notes: https://ez-systems-developer-documentation--3161.com.readthedocs.build/en/3161/release_notes/ibexa_dxp_v5.0/index.md