Initial commit
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
# AGENTS.md
|
||||
|
||||
## Purpose
|
||||
This project is a small Markdown-to-HTML utility used behind NGINX.
|
||||
When a `.md` file is requested, `md2html.php` loads the Markdown, converts it with Parsedown, and renders HTML styled by `markdown.css`.
|
||||
|
||||
## Key Files
|
||||
- `md2html.php`: entrypoint for conversion and HTML output.
|
||||
- `markdown.css`: visual styling for rendered Markdown (`.markdown-body`).
|
||||
- `composer.json`: PHP dependency config (`erusev/parsedown`).
|
||||
|
||||
## Environment Assumptions
|
||||
- Project root: `D:\www\md2html`
|
||||
- Markdown files are resolved from `D:\www\...`
|
||||
- CSS is currently linked as `//localhost/md2html/markdown.css`
|
||||
|
||||
## Change Priorities
|
||||
1. Keep output readable on desktop and mobile.
|
||||
2. Preserve Markdown semantics generated by Parsedown.
|
||||
3. Avoid introducing JS unless explicitly required.
|
||||
4. Keep the utility simple and fast.
|
||||
|
||||
## Styling Rules (`markdown.css`)
|
||||
- Style only inside `.markdown-body` unless there is a strong reason to change global page behavior.
|
||||
- Must cover: headings, links, lists, blockquotes, inline code, code blocks, tables, images, hr.
|
||||
- Keep strong contrast and accessible font sizes.
|
||||
- Ensure long code lines and wide tables remain usable on small screens (`overflow-x`).
|
||||
- Prefer CSS variables for colors and spacing to simplify future theme changes.
|
||||
|
||||
## PHP Rules (`md2html.php`)
|
||||
- Keep dependency loading via `vendor/autoload.php`.
|
||||
- Keep response minimal: `<!doctype html>`, UTF-8 meta, stylesheet link, wrapped content.
|
||||
- Do not remove `.md` extension guard.
|
||||
- Any path-handling changes must remain compatible with Windows paths.
|
||||
|
||||
## Recommended Validation After Edits
|
||||
1. Open at least one Markdown file with:
|
||||
- headings (`#`, `##`, `###`)
|
||||
- lists
|
||||
- fenced code block
|
||||
- table
|
||||
- blockquote
|
||||
- image
|
||||
2. Verify layout on desktop and mobile width.
|
||||
3. Verify links and code blocks remain readable.
|
||||
|
||||
## Non-Goals
|
||||
- Building a full CMS.
|
||||
- Adding heavy frontend frameworks.
|
||||
- Replacing Parsedown unless explicitly requested.
|
||||
Reference in New Issue
Block a user