P
PaperHouseastro theme ~
Get started

Data Files

Learn what every JSON file in src/data controls and how to edit them safely in PaperHouse.

Data Files

PaperHouse keeps all page text, labels, and configuration in JSON files under src/data/. Nothing is hardcoded in the layouts. This page explains each file.

Why JSON?

JSON files let you edit content without touching Astro code. Change a headline, rename a label, update a footer link — all from a single file.

The files

File Controls
site.json Brand, nav, footer, SEO, per-page meta
home.json Home page copy and structure
work.json Works page labels
blog.json Blog page labels
category.json Category page labels
tag.json Tag page labels
docs.json Docs sidebar structure

site.json

Controls everything that appears on every page.

Sections:

  • brand — logo text, initial, tagline
  • seo — default title, description, keywords, OG image
  • pages — per-page meta
  • nav — navbar links
  • cta — main call-to-action button
  • footer — footer headline, body, columns, copyright

home.json

Controls the home page.

Sections:

  • hero — headline, badge, scroll indicator
  • marquee — infinite ticker items
  • why — feature block
  • journal — label and view-all link
  • cta — final call-to-action block

work.json

Labels for the works listing and detail pages.

Sections:

  • index — header, empty state, footer
  • slug — labels for meta grid, gallery, prev/next

Example:

"slug": {
  "metaLabels": {
    "client": "Client",
    "year": "Year",
    "discipline": "Discipline",
    "type": "Type"
  }
}

Want to rename “Discipline” to “Category”? Edit metaLabels.discipline.

blog.json

Labels for the blog listing and detail pages.

Sections:

  • index — header, featured block labels, footer
  • slug — back link, prev/next labels, reading time suffix

category.json

Labels for /category and /category/[cat].

Sections:

  • header — back link, kicker, entries suffix
  • index — kicker, headline, subtitle
  • sections — labels for grouped content
  • empty — empty state message

tag.json

Labels for /tag and /tag/[tag].

Sections:

  • header — back link, kicker, posts suffix
  • index — kicker, headline, subtitle
  • empty — empty state message

docs.json

Controls the sidebar navigation and structure for the documentation.

Sections:

  • index — landing page headline, sections, item order
  • sidebar — sidebar title and back link
  • footer — prev/next labels

When you add a new doc page, add it to index.sections or it won’t appear in the sidebar.

Editing safely

Keep JSON valid

JSON is strict. Common mistakes:

  • Trailing comma after the last item
  • Single quotes instead of double quotes
  • Missing comma between items
  • Unescaped quotes inside a string

If your site breaks after editing JSON, check for these first.

Use a code editor with JSON support

VS Code highlights JSON errors in real time.

Test after each change

Save, refresh the browser, look for problems. Do not edit five files at once.

Keep a backup

Before making big changes:

cp src/data/site.json src/data/site.backup.json

Adding new entries

Add a nav link in site.json:

"nav": [
  { "href": "/works", "label": "Works" },
  { "href": "/blog", "label": "Journal" },
  { "href": "/pricing", "label": "Pricing" }
]

Add a footer column in site.json:

"columns": [
  { "title": "Theme", "links": [ ... ] },
  { "title": "Legal", "links": [
    { "href": "/privacy", "label": "Privacy" },
    { "href": "/terms", "label": "Terms" }
  ] }
]

Add a page meta entry in site.json:

"pages": {
  "pricing": {
    "title": "Pricing",
    "description": "Simple one-time pricing for PaperHouse.",
    "image": "/astro.svg",
    "type": "website"
  }
}

Then create src/content/pages/pricing.md. The template uses this metadata automatically.