Personal blog and portfolio built with Astro.
Live site: https://bernardodiasdacruz.com
Node.js v22 (use nvm to manage Node versions)
yarn install- Development:
yarn dev— starts the dev server at http://localhost:4321/ - Build:
yarn build— generates static files indist/ - Preview:
yarn preview— serves the production build locally - Deploy:
yarn deploy— publishesdist/to GitHub Pages viagh-pages
Posts with draft: true in their frontmatter are hidden from all listings by default.
To preview drafts:
- Local dev: drafts are always visible on
localhost— just runyarn dev - Production: add
?draftto any URL (e.g.https://bernardodiasdacruz.com/?draft)
Draft post pages are always built and accessible by direct URL. The ?draft flag only controls whether they appear in listings.
To publish a draft, remove the flag or set it to false:
---
draft: true # hidden from listings unless ?draft
draft: false # always visible (default when omitted)
---