Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "/",
"name": "RenderMD",
"short_name": "RenderMD",
"description": "Paste, drop or link any markdown and read it beautifully typeset. Private, free, no ads.",
"description": "Paste, drop or link a markdown file and read it as a typeset page. Free and private, with no ads.",
"start_url": "/",
"scope": "/",
"display": "standalone",
Expand Down
9 changes: 2 additions & 7 deletions src/features/cheatsheet/components/ClosingCta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@ import { ArrowRight } from 'lucide-react'
export function ClosingCta() {
return (
<aside className="relative overflow-hidden rounded-2xl bg-ink px-8 py-12 text-paper md:px-14 print:hidden">
<p className="label-caps text-proof">Now you know the marks</p>
<p className="mt-4 max-w-lg font-display text-5xl leading-[1.02] tracking-tight">
Go write something worth reading.
</p>
<p className="mt-4 max-w-md text-[15px] leading-relaxed text-paper/70">
Paste, drop or link any markdown file and RenderMD typesets it instantly — private, free, no
ads.
<p className="max-w-lg font-display text-5xl leading-[1.02] tracking-tight">
Write markdown and see it typeset as you go.
</p>
<Link
to="/"
Expand Down
3 changes: 1 addition & 2 deletions src/features/cheatsheet/components/Faq.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import { FAQ } from '../content'
export function Faq({ answers }: { answers: Root[] }) {
return (
<section id="faq" aria-labelledby="faq-title" className="scroll-mt-24">
<p className="label-caps text-proof">Questions</p>
<h2
id="faq-title"
className="mt-2 mb-10 font-display text-[clamp(2.2rem,4.5vw,3.2rem)] leading-none tracking-[-0.015em] text-ink"
className="mb-10 font-display text-[clamp(2.2rem,4.5vw,3.2rem)] leading-none tracking-[-0.015em] text-ink"
>
Frequently asked
</h2>
Expand Down
6 changes: 2 additions & 4 deletions src/features/cheatsheet/components/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,14 @@ export function Hero({ specimen }: { specimen: Root }) {
<Breadcrumb />

<p className="mt-14 animate-rise label-caps text-proof [animation-delay:60ms] md:mt-20">
The complete reference · {SECTIONS.length} topics · {EXAMPLE_COUNT} live examples
{SECTIONS.length} topics · {EXAMPLE_COUNT} editable examples
</p>
<h1 className="mt-5 max-w-3xl animate-rise font-display text-[clamp(3.4rem,10vw,8rem)] leading-[0.88] tracking-[-0.02em] text-ink [animation-delay:120ms]">
Markdown <br />
<em className="text-ink-3">cheat sheet</em>
</h1>
<p className="mt-8 max-w-[34rem] animate-rise text-lg leading-relaxed text-ink-2 [animation-delay:180ms]">
Every markdown syntax — CommonMark, GitHub Flavored Markdown, math and diagrams — with
examples you can edit and watch render. Nothing here is a mock-up: each one runs through
the same renderer as the RenderMD editor.
CommonMark, GitHub Flavored Markdown, math and diagrams. Every example is editable.
</p>
<div className="relative z-10 mt-9 flex max-w-xl animate-rise flex-col gap-3 [animation-delay:240ms] sm:flex-row print:hidden">
<SearchBox className="flex-1" />
Expand Down
3 changes: 1 addition & 2 deletions src/features/cheatsheet/components/QuickReference.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ export function QuickReference() {
<section id="quick-reference" aria-labelledby="quick-reference-title" className="scroll-mt-24">
<div className="mb-8 flex flex-wrap items-end justify-between gap-4">
<div>
<p className="label-caps text-proof">At a glance</p>
<h2
id="quick-reference-title"
className="mt-2 font-display text-[clamp(2.2rem,4.5vw,3.2rem)] leading-none tracking-[-0.015em] text-ink"
className="font-display text-[clamp(2.2rem,4.5vw,3.2rem)] leading-none tracking-[-0.015em] text-ink"
>
Markdown syntax, quick reference
</h2>
Expand Down
17 changes: 7 additions & 10 deletions src/features/cheatsheet/content/chapters/basics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ export const basics: CheatsheetChapter = {
id: 'basics',
numeral: 'I',
title: 'The basics',
intro:
'Everything in this chapter is CommonMark, the standard behind almost every markdown renderer. Learn these and you can write markdown anywhere.',
intro: 'CommonMark: the core syntax that works in nearly every markdown renderer.',
sections: [
{
id: 'headings',
Expand All @@ -32,7 +31,6 @@ export const basics: CheatsheetChapter = {
],
tips: [
'Always put a space after the hashes: `#Heading` is just text in most renderers.',
'Leave a blank line before and after a heading for maximum compatibility.',
'Every heading gets an anchor you can link to: `[Jump](#headings)` scrolls to a heading called “Headings”.',
],
},
Expand All @@ -41,7 +39,7 @@ export const basics: CheatsheetChapter = {
title: 'Paragraphs & line breaks',
support: 'commonmark',
summary:
'Separate paragraphs with a blank line. A single newline is treated as a space — end a line with a backslash (or two spaces) to force a line break.',
'Separate paragraphs with a blank line. A single newline is treated as a space. To force a line break, end the line with a backslash (or two spaces).',
entries: [
{
source: lines(
Expand All @@ -62,7 +60,7 @@ export const basics: CheatsheetChapter = {
},
],
tips: [
'Prefer the trailing backslash `\\` over two trailing spaces — spaces are invisible and editors often strip them.',
'Prefer the trailing backslash `\\` over two trailing spaces. Spaces are invisible, and editors often strip them.',
'Don’t indent paragraphs: four leading spaces turn a line into a code block.',
],
},
Expand All @@ -87,7 +85,7 @@ export const basics: CheatsheetChapter = {
],
tips: [
'Use asterisks inside words: `un*frigging*believable` works, while underscores inside words are ignored so `snake_case_names` stay intact.',
'There’s no underline in markdown — use `<ins>underline</ins>` if you really need it.',
'Markdown has no underline. If you need one, use `<ins>underline</ins>`.',
],
},
{
Expand Down Expand Up @@ -149,7 +147,7 @@ export const basics: CheatsheetChapter = {
},
],
tips: [
'The actual numbers don’t matter after the first: `1.` `1.` `1.` renders as 1, 2, 3 — handy for reordering.',
'The actual numbers don’t matter after the first: `1.` `1.` `1.` renders as 1, 2, 3, so you can reorder items without renumbering.',
'Nested items must line up with the *text* of their parent, not the bullet: two spaces after `-`, three after `1.`.',
'Pick one bullet character per list; switching characters starts a new list.',
],
Expand Down Expand Up @@ -194,7 +192,6 @@ export const basics: CheatsheetChapter = {
'To show a backtick inside inline code, wrap it in double backticks: ``` `` a ` b `` ```.',
'To show a code fence inside a code block, use four backticks for the outer fence.',
'Common language names: `js`, `ts`, `tsx`, `python`, `bash`, `json`, `yaml`, `sql`, `rust`, `go`, `html`, `css`, `diff`.',
'Four spaces of indentation also make a code block, but fences are clearer and support highlighting.',
],
},
{
Expand Down Expand Up @@ -230,7 +227,7 @@ export const basics: CheatsheetChapter = {
{ label: 'Section links', source: 'Jump back to [Headings](#headings).' },
],
tips: [
'Spaces in URLs break links — encode them as `%20`, or wrap the URL in angle brackets: `[a](<my file.md>)`.',
'Spaces in URLs break links. Encode them as `%20`, or wrap the URL in angle brackets: `[a](<my file.md>)`.',
'Reference definitions can live anywhere in the document and never render.',
],
},
Expand All @@ -252,7 +249,7 @@ export const basics: CheatsheetChapter = {
},
],
tips: [
'Markdown has no syntax for size — use HTML: `<img src="logo.png" width="120" alt="Logo">`.',
'Markdown has no syntax for image size, so use HTML: `<img src="logo.png" width="120" alt="Logo">`.',
'Center an image with `<p align="center"><img src="…"></p>`, as many READMEs do.',
],
},
Expand Down
11 changes: 6 additions & 5 deletions src/features/cheatsheet/content/chapters/beyond.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ export const beyond: CheatsheetChapter = {
id: 'beyond',
numeral: 'III',
title: 'Beyond the spec',
intro:
'Math, diagrams, emoji and HTML aren’t part of any markdown standard, but they’re supported by GitHub, GitLab, Obsidian and RenderMD — and they make documents far more expressive.',
intro: 'Not part of any markdown standard, but supported by GitHub, GitLab and Obsidian.',
sections: [
{
id: 'math',
Expand Down Expand Up @@ -99,7 +98,9 @@ export const beyond: CheatsheetChapter = {
title: 'Emoji',
support: 'extended',
summary: 'Type an emoji shortcode between colons, or paste the emoji itself.',
entries: [{ source: 'Ship it :rocket: — great work :tada: :sparkles: :white_check_mark:' }],
entries: [
{ source: 'Ship it :rocket: Tests pass :white_check_mark: Time to celebrate :tada:' },
],
tips: ['Shortcodes follow GitHub’s names, the same ones used in GitHub issues and Slack.'],
},
{
Expand Down Expand Up @@ -131,7 +132,7 @@ export const beyond: CheatsheetChapter = {
},
],
tips: [
'Scripts, styles, event handlers and iframes are removed for safety — on GitHub and in RenderMD alike.',
'Scripts, styles, event handlers and iframes are removed for safety, both on GitHub and in RenderMD.',
'`<mark>` highlights work in RenderMD but are stripped on GitHub.',
],
},
Expand All @@ -140,7 +141,7 @@ export const beyond: CheatsheetChapter = {
title: 'Comments',
support: 'commonmark',
summary:
'HTML comments are hidden from the rendered page — perfect for notes to yourself or other authors.',
'HTML comments don’t appear on the rendered page. Use them for notes to yourself or other authors.',
entries: [
{
source: lines(
Expand Down
6 changes: 3 additions & 3 deletions src/features/cheatsheet/content/chapters/gfm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const gfm: CheatsheetChapter = {
numeral: 'II',
title: 'GitHub Flavored Markdown',
intro:
'GFM adds tables, task lists, strikethrough, autolinks and footnotes to CommonMark. It’s supported by GitHub, GitLab, VS Code, Obsidian, Reddit and RenderMD.',
'GitHub’s additions to CommonMark, also supported by GitLab, VS Code, Obsidian and Reddit.',
sections: [
{
id: 'tables',
Expand Down Expand Up @@ -36,7 +36,7 @@ export const gfm: CheatsheetChapter = {
},
],
tips: [
'The pipes don’t need to line up — but aligned tables are easier to read in source. RenderMD’s Table button inserts a starter.',
'The pipes don’t need to line up, though aligned tables are easier to read in source.',
'Escape a literal pipe inside a cell with `\\|`.',
'Cells can only hold inline content. Use `<br>` for line breaks; lists and code blocks aren’t allowed.',
],
Expand All @@ -57,7 +57,7 @@ export const gfm: CheatsheetChapter = {
},
],
tips: [
'In the RenderMD editor you can tick the boxes right in the preview — the markdown updates itself.',
'In the RenderMD editor you can tick the boxes in the preview, and the markdown updates to match.',
],
},
{
Expand Down
6 changes: 3 additions & 3 deletions src/features/cheatsheet/content/faq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export const FAQ: Array<{ question: string; answer: string }> = [
{
question: 'What is markdown?',
answer:
'Markdown is a lightweight way to format plain text. You write `**bold**` or `# Heading` and a renderer turns it into formatted text. It was created by John Gruber in 2004 and is now used everywhere from GitHub READMEs to notes apps, chat tools and documentation sites.',
'Markdown is a lightweight way to format plain text. You write `**bold**` or `# Heading` and a renderer turns it into formatted text. John Gruber created it in 2004.',
},
{
question: 'What’s the difference between CommonMark and GitHub Flavored Markdown?',
Expand All @@ -28,11 +28,11 @@ export const FAQ: Array<{ question: string; answer: string }> = [
{
question: 'Can I use HTML in markdown?',
answer:
'Yes — most renderers allow a safe subset of HTML for things markdown can’t express, like `<details>` for collapsible sections, `<kbd>` for keys and `<img width="…">` for sized images. Scripts and event handlers are always removed.',
'Yes. Most renderers allow a safe subset of HTML for things markdown can’t express, like `<details>` for collapsible sections, `<kbd>` for keys and `<img width="…">` for sized images. Scripts and event handlers are always removed.',
},
{
question: 'How can I preview a markdown file?',
answer:
'Paste or drop it into [RenderMD](https://www.render-md.com) — it renders instantly in your browser, including tables, math and diagrams, without uploading the file anywhere. You can also open a URL or a GitHub repository directly.',
'Paste or drop it into [RenderMD](https://www.render-md.com). It renders in your browser, including tables, math and diagrams, and the file is never uploaded. You can also open a URL or a GitHub repository directly.',
},
]
6 changes: 3 additions & 3 deletions src/features/cheatsheet/content/support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ export const SUPPORT_LABEL: Record<Support, { label: string; description: string
gfm: {
label: 'GFM',
description:
'GitHub Flavored Markdown — supported by GitHub, GitLab, Reddit, VS Code and most modern tools.',
'GitHub Flavored Markdown — supported by GitHub, GitLab, Reddit, VS Code and many other tools.',
},
github: {
label: 'GitHub',
description: 'A GitHub extension, also supported by RenderMD and a growing number of tools.',
description: 'A GitHub extension, also supported by RenderMD and some other tools.',
},
extended: {
label: 'Extended',
description:
'Widely supported extension (GitHub, GitLab, Obsidian, RenderMD…) but not part of a spec.',
'Not part of any spec, but supported by GitHub, GitLab, Obsidian, RenderMD and others.',
},
}
8 changes: 4 additions & 4 deletions src/features/cheatsheet/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import { stripHeadingIds } from '@/features/markdown/engine/hast'
import { FAQ, SECTIONS } from './content'

/** The hero's specimen, shown as source and as the typeset page. */
export const HERO_SOURCE = `## Proof, not *promise*
export const HERO_SOURCE = `## Weekly *notes*

- [x] Typeset in your browser
- [ ] Ads, trackers, sign-ups
- [x] Ship the share dialog
- [ ] Write the changelog

> Write like nobody's rendering.`
> Review on Friday.`

export type CheatsheetData = {
hero: Root
Expand Down
8 changes: 4 additions & 4 deletions src/features/cheatsheet/seo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export const getCheatsheetJsonLd = () => [
'@context': 'https://schema.org',
'@type': 'TechArticle',
headline: 'Markdown Cheat Sheet',
alternativeHeadline: 'Every markdown syntax with live, editable examples',
alternativeHeadline: 'Markdown syntax with live, editable examples',
description:
'A complete markdown reference: CommonMark basics, GitHub Flavored Markdown, alerts, footnotes, LaTeX math and Mermaid diagrams, each with live rendered examples.',
'A markdown reference covering CommonMark basics, GitHub Flavored Markdown, alerts, footnotes, LaTeX math and Mermaid diagrams, each with live rendered examples.',
image: `${SITE_URL}/og-cheatsheet.png`,
url: CHEATSHEET_URL,
inLanguage: 'en',
Expand Down Expand Up @@ -63,8 +63,8 @@ export const getCheatsheetJsonLd = () => [
export const cheatsheetHead = () => ({
meta: [
...seo({
title: 'Markdown Cheat Sheet — Complete Syntax Guide with Live Examples | RenderMD',
description: `Every markdown syntax in one place: headings, lists, links, images, code, tables, task lists, footnotes, alerts, LaTeX math and Mermaid diagrams — ${EXAMPLE_COUNT} live, editable examples.`,
title: 'Markdown Cheat Sheet: Syntax Guide with Live Examples | RenderMD',
description: `Markdown syntax in one place: headings, lists, links, images, code, tables, task lists, footnotes, alerts, LaTeX math and Mermaid diagrams, with ${EXAMPLE_COUNT} live, editable examples.`,
url: CHEATSHEET_URL,
image: `${SITE_URL}/og-cheatsheet.png`,
imageAlt: 'The RenderMD markdown cheat sheet',
Expand Down
10 changes: 5 additions & 5 deletions src/features/workspace/WorkspaceSkeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ export function WorkspaceSkeleton() {
<div className="h-10 border-b border-rule" />
<div className="space-y-3 p-8 font-mono text-[13px] text-ink-4">
<p># A field guide to RenderMD</p>
<p>Paste it, drop it, or type it…</p>
<p>This page shows what RenderMD can render…</p>
</div>
</div>
<div className="flex-1 overflow-hidden desk-grid px-4 pt-12 md:px-10">
<div className="mx-auto max-w-[54rem] rounded-[3px] bg-paper px-6 py-12 shadow-paper md:px-16 md:py-16">
<div className="doc" data-typeset="sans">
<h1>Beautiful markdown, rendered instantly.</h1>
<h1>Read and write markdown in your browser.</h1>
<p>
Paste it, drop it, or link it — RenderMD typesets any markdown file in your browser.
GitHub Flavored Markdown, Mermaid diagrams, LaTeX math, syntax highlighting for 200+
languages, private share links and clean PDF export. No ads, no sign-up.
Paste, drop or link a markdown file and RenderMD typesets it in your browser. It
supports GitHub Flavored Markdown, Mermaid diagrams, LaTeX math, syntax highlighting
for 200+ languages, private share links and PDF export. No ads, no sign-up.
</p>
<div className="animate-pulse space-y-3 pt-4">
<div className="h-4 w-full rounded bg-paper-3" />
Expand Down
8 changes: 3 additions & 5 deletions src/features/workspace/panes/preview/EmptyState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ export function EmptyState() {
const openDialog = useUiStore((state) => state.openDialog)
return (
<div className="flex flex-col items-start py-6">
<p className="mb-5 label-caps text-proof">Nothing to render — yet</p>
<h2 className="font-display text-[clamp(2.4rem,5vw,3.4rem)] leading-[1.02] tracking-[-0.015em] text-ink">
A blank page,
Nothing to
<br />
<em className="text-ink-3">full of promise.</em>
<em className="text-ink-3">render yet.</em>
</h2>
<p className="mt-5 max-w-sm text-[15px] leading-relaxed text-ink-2">
Start typing in the editor, or bring something in. Files can also be dropped anywhere on
this page.
Start typing, or drop a file anywhere on this page.
</p>
<div className="mt-7 grid w-full max-w-md grid-cols-2 gap-2">
<Button
Expand Down
Loading
Loading