Let a file say it's written for reader with reader: in its front matter

Open
#203 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
62/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript
Domain
frontend

Research direction

Read docs/page.md and the markdown handling referenced at static/markdown.js:61-72; check how front matter and the byline are handled. The issue leaves the version format and whether generators should write the key as open questions. Done means docs/page.md documents the key and the byline does not show it.

Written by the indexing model from the issue text.

Description

enhancement team-attention

Part of #201.

Every GitHub-flavored markdown file is also reader-markdown, so a page that gets a .md file from somewhere else can't tell from its syntax whether it was written for reader.
A type: slides or type: workbook line says so (static/markdown.js:61-72), but a plain document has nothing that does.

A front matter key could say it:

---
title: Jeremiah 1–6
reader: 0.0.7
---
  • reader: says the file is meant to be read with reader.
  • Its value, if it has one, is the version of the syntax it was written for. That matters while the syntax can still change in 0.0.x: a viewer that's out of date can say so, rather than showing the page wrong.
  • reader itself shows nothing for it; it isn't in the byline.

Questions

  • Is a version worth having, or is reader: true enough until 1.0?
  • Should reader-authors' generators write it?

Done when

  • The key is in docs/page.md, and the byline leaves it out.
Dominant language
JavaScript
Stars
0
Forks
1
Avg merge
2d 4h
Merged PRs (30d)
26

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jzheaux/reader

All issues in jzheaux/reader

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.