Denzel documentation — Astro
Everything you need to take Denzel for Astro from the downloaded folder to a published blog or magazine. Read in this order, or jump to what you need.
| Guide | What it covers |
|---|---|
| Install and run | Requirements, install, the commands, what is in each folder |
| Editing the content | Editing text, images, posts, categories, authors, Home’s picks and the sidebar — no CMS needed |
| Making it look like your brand | Colours, the logo, fonts, text styles, spacing, motion, components, the style guide |
| Pages and sections | The header, the search, the sidebar, the sections of every page with a map of each, adding and removing pages and sections |
| Forms | Making the newsletter box deliver to you |
| Using a headless CMS | The collections and their fields, for connecting Sanity, Payload, Strapi, Directus or any other headless CMS |
| Going live | Pre-launch checklist, deploying, domains, what to do after launch |
| Troubleshooting and questions | Errors, questions and answers |
What is in the package
Section titled “What is in the package”- 6 kinds of page, 39 addresses:
- Home, the Blog (every post) and the 404 page;
- a page for each of the 5 categories, the 6 authors and the 26 posts, built from the collections (Pages and sections).
- 3 collections in
src/content/collections/: posts (posts.json, 26), categories (categories.json, 5, with the default “Uncategory”) and authors (authors.json, 6, with the default “Admin”). A post names its category and author by slug. - 1 form: the newsletter box in the footer of every page. It runs in demo mode until you give it a destination: a form service or webhook on any static host, or the site’s own route with four ways to deliver (a log, a webhook, Mailchimp, Resend).
- A row of featured posts under the header that slides by itself, Editor’s Pick, Trending and Latest on Home, and a sidebar (About, Recent, Explore Topics) beside Home, the category, author and post pages.
- A search in the header that finds posts, categories and authors as you type.
- A fixed header with a menu that grows under the bar on phones and tablets.
- Motion in the components (the slider, the photo hovers, the menu, the search box), with reduced-motion support,
and a style guide of every component at
/style-guide. - Search and sharing: a title, a description and a canonical link for every page, share cards (a post shares its
cover), a browser icon,
sitemap.xmlandrobots.txt. - Placeholders: the photos in
src/assets/images/are grey placeholders that show their sizes (the demo uses photos from Unsplash and Pexels, or made for the template, which can’t be sold with a template). The logo is drawn for the template. - These docs (
docs/), the forms guide (Forms reference), the design system’s reference (Denzel design system (Astro)),CHANGELOG.mdandLICENSE.md.
In a hurry: the first 15 minutes
Section titled “In a hurry: the first 15 minutes”npm installnpm run dev- Open http://localhost:4321.
- Put your name, description and domain in
siteofsrc/content/site.json, and your menu, social links, sidebar text and footer (its text, e-mail, newsletter box and copyright line) in the same file. Home’s browser title and description aremetainsrc/content/pages/home.json. - Replace the photos in
src/assets/images/(keep the file names and you are done) and write analtfor each in the content (Editing the content). - Replace the logo (
src/assets/images/logo.svg, Making it look like your brand), the browser icons inpublic/(icon.svg,apple-icon.png) and the share image (public/opengraph-image.png). - Write your posts, categories and authors in
src/content/collections/, then pick the posts Home features, the sidebar’s Recent and the footer’s two posts by slug (Editing the content). Search for “Denzel” and “hello@example.com”: the demo’s name and e-mail are written in several places (Editing the content). - Point the newsletter box at your list: Forms.
- Deploy: Going live.
Nothing else is required: the site has no database, no account to create and no paid service to run.
How this template is put together
Section titled “How this template is put together”- Content is data. All text and every collection item live in
src/content/, as JSON. Pages read the collections throughsrc/lib/content.ts, andsrc/content.config.tssays where each collection comes from, which is why swapping in a CMS later touches one file, not the whole site. - Design is tokens. Colours, breakpoints and the photo easing are in
src/design-system/theme.css; text styles and springs insrc/design-system/tokens/. Change a token and every page follows (Making it look like your brand). - Components are shared. Every card, widget, button and section is in
src/design-system/orsrc/components/, and is shown at/style-guideon your own site. One card component (PostCard) draws all seven looks of a post. - Some blocks repeat. The header, the sidebar and the footer appear on many pages from one file,
src/content/site.json; the labels of the Blog, category, author and post pages are insrc/content/pages/blog.json(Pages and sections). - No framework in the browser. The pages are static HTML. Each interactive part has a small TypeScript script in
src/design-system/scripts/(the header’s is insrc/components/site/) whoseinit*()function the component’s<script>calls, and hovers are CSS (Making it look like your brand).
Getting help
Section titled “Getting help”- Your licence terms: License.
- What changed in each release: Changelog.
- Support and updates: https://framebrick.co/support.
- Want it done for you? Marcframe, the studio behind this template, updates templates to your needs, builds custom templates and designs new sites. It’s also on Contra.