Skip to content

Latest commit

 

History

History
88 lines (70 loc) · 2.63 KB

File metadata and controls

88 lines (70 loc) · 2.63 KB

Project: Decent Patterns

A Quartz v4 static site — the pattern library and website of Decent Patterns (decentpatterns.com, repo decentpatterns/library). The pre-Quartz content is archived on the master branch; see MIGRATION.md for cutover status.

Dev Commands

npm install                      # Install dependencies
npx quartz build                 # Build the site
npx quartz build --serve         # Build and serve at http://localhost:8080
npm run check                    # TypeScript check + Prettier check
npm run format                   # Format with Prettier
npm test                         # Run tests (tsx --test)

Project Structure

  • content/ — All Markdown content (edit these for content changes)
    • content/patterns/<name>.md — Pattern pages (one per pattern)
    • content/patterns/<name>/ — Images for each pattern (SVG, PNG, JPEG)
    • content/topics/<name>.md — Topic category pages (one per topic)
    • content/glossary/index.md — Glossary overview page (linked from index as [[Glossary]])
    • content/glossary/<name>.md — Glossary term pages (one per term)
    • content/index.md — Landing page
  • quartz.config.ts — Site config (title, theme colors, plugins)
  • quartz.layout.ts — Page layout and sidebar components
  • quartz/ — Quartz framework source (avoid editing unless necessary)

Content Conventions

Pattern frontmatter:

---
title: "Pattern Name"
description: "One-line description"
tags:
  - protocol # or: ux, social, etc.
  - topic/moderation-curation # hierarchical topic tag
status: stub # stub | draft | mature — stubs publish visibly; no draft: true hiding
aliases:
  - "library/pattern-name" # only for patterns that existed on the old site
---

Glossary frontmatter:

---
title: "Term"
description: "Short definition."
tags:
  - reference
---

Topic page frontmatter:

---
title: "Topic Name"
description: "..."
tags:
  - topic
---

Pattern page sections (in order):

  1. The Design Problem
  2. The Design Solution
  3. Examples
  4. Why Choose [Pattern]?
  5. Best Practice: How to Implement [Pattern]
  6. Potential Problems with [Pattern]
  7. The Take Away
  8. References & Where to Learn More

Wikilinks: Use [[pattern-name|Display Text]] for cross-references. Quartz resolves by shortest path.

Image callouts: Use > [!example] callout blocks for image galleries.

What NOT to do

  • Don't create new dependencies without asking
  • Don't refactor unrelated code while fixing a bug
  • Don't create new files when editing an existing one will do
  • Don't edit files inside quartz/ unless the task specifically requires it