Prompts
How to create and customize the Prompt source for Homepage content.
Purpose
Use Prompt.md to explain one Homepage content item.
Use Prompt.md to explain one Homepage content item.
These Prompts are generated files that combine a reusable explanation with information from the related file.
Do not confuse them with authored prompts in the Prompt library.
Templates
Choose a profile or keep a local template.
Choose a profile or keep a local template.
System templates live in . The available profiles are:
The optional field chooses a system profile. A named profile overrides a local ; chooses the local template. If is absent, a non-empty local is used first. Otherwise the Generator chooses a suitable profile from the content.
Tutorial content selects automatically. , , and are selected automatically only for full-screen Slides. Inline media keeps the ordinary profile. A Listing Element selects ; the remaining content kinds select their matching profile, with as the fallback.
Generated Prompt sources follow the same content path under . Editors change templates in ; generated copies are outputs.
Customize
Add a non-empty Prompt.md beside Content.md when one item needs custom wording.
Add a non-empty Prompt.md beside Content.md when one item needs custom wording.
Before customizing a Prompt, make sure that:
The content has a valid file.
uses the exact filename and sits in the same folder.
The template contains non-empty Markdown.
Dynamic values use supported placeholders.
The template does not add private information that should not be public.
Leave absent to let this local template be selected automatically, or set when the choice should be explicit. A named profile such as deliberately uses its system template instead of the local .
Prompt templates support the same author comments as . Full-line and trailing comments are removed outside fenced code blocks before placeholders are replaced.
Placeholders
Insert content details, links, and cleaned Markdown with placeholders.
Insert content details, links, and cleaned Markdown with placeholders.
Write the fixed part of the Prompt as ordinary Markdown. Add placeholders wherever the generated Prompt should include information from the content.
| Placeholder | Inserted value |
|---|---|
| `<published\ | not published>` |
| The content title | |
| The content summary | |
| Short generated source, route, kind, and Markdown-source context | |
| The absolute URL of the Homepage root, based on | |
| The canonical public Web URL for the content | |
| The public URL of the generated source | |
| An alias for | |
| The public URL of the generated source | |
| The public Markdown representation of the content |
Use where the Prompt should include the content itself. A surrounding explanation and a clear delimiter can make the inserted Markdown easier to copy:
Example content section
The content is:
"""
<Markdown>
"""Publishing
Generation creates a public Prompt.md and its Content.md source.
Generation creates a public Prompt.md and its Content.md source.
The generated public starts with a small metadata header and then the public Markdown body:
---
title: <Title>
summary: <Summary>
url: <UrlWeb>
source: <UrlMarkdown>
---The placeholders in this example are replaced with the content's actual title, summary, public Web URL, and public Markdown URL. The authored frontmatter is not copied into the generated file.
The public Markdown body is prepared for sharing:
Editor comments are removed, except inside fenced code blocks.
Colon-marked hidden sections are omitted unless the content explicitly shows them.
Root-relative links are converted to public links.
Fenced code blocks remain available as code.
Consecutive empty lines are reduced to one blank line.
The placeholder inserts this public body into a Prompt; it does not repeat the generated metadata header. Generated files also contain no consecutive empty lines.
Example
This example shows the pattern; it is not required.
This example shows the pattern; it is not required.
Example Prompt template
This is a Prompt for "<Title>".
The content is <published|not published>.
Open the Homepage at <UrlWeb>.
Read the source at <UrlMarkdown>.
The content:
"""
<Markdown>
"""For a published content item titled , the generated Prompt replaces the placeholders with the item's status, title, public URL, Markdown source URL, and public Markdown.
Update
Run make generate after editing so the generated source catches up.
Run make generate after editing so the generated source catches up.
Edit the source in the content folder.
Run from the Workspace root.
Open the generated Prompt source and check the links, metadata, and inserted Markdown.
Changing the source template does not change an already generated Prompt until generation has run again.