About Xenon

Open Graph card poster

Welcome to Astro Xenon

Xenon is an open source Astro theme for bloggers that aims to excel in performance with accessibility in mind.

It relies on a few other plugins from the community like astro-imagetools and astro-icon.

β›Ί Setup

  1. Clone this project:
git clone https://github.com/djmtype/astro-xenon.git
  1. Run npm install or use your favorite build tool.
  2. Enjoy!

πŸ— Project Structure

Inside the Astro Xenon project, you’ll see the following folders and files:

/
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ fonts/
β”‚   β”œβ”€β”€ images/
β”‚   └── rss/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ global/
β”‚   β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ demo/
β”‚   β”œβ”€β”€ layouts/
β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   └── blog/
β”‚   └── styles/
β”œβ”€β”€ astro.config.mjs
β”œβ”€β”€ package.json
└── postcss.config.js

πŸ“– Settings / Instructions

General Site Settings

For easier access, general site settings can be managed via src/data/site.json.

These settings include:

  • Global site information
  • Main navigation links
  • Social profile links
  • Number of posts displayed on the Home page
  • Pagination size on the Blog landing page

RSS Feed

RSS has been pre-configured based on any markdown file placed within src/pages/blog. Be sure to configure your site’s feed information in src/pages/feed.xml.js.

Postscript: Adjust the site property value found in astro.config.mjs.

Styling

This theme utilizes JIT Open-Props in a big way.

In addition, PostCSS Preset Env is used to accomplish Sass-like things such as custom media queries, css file imports, and nesting.

  • Schemes for light and dark can be found within the src/styles/schemes directory
  • Extra and aliased props reside in src/styles/common/_variables.css

Common Astro Practices

Astro looks for .astro, .md(x) files in the src/pages/ directory. Each page is exposed as a route based on its file name.

There’s nothing special about src/components/, but that’s where we like to put any Astro/React/Vue/Svelte/Preact components or layouts.

Any static assets, like images, can be placed in the public/ directory.

Learn more about Astro

Feel free to check Astro’s documentation or jump into Astro’s Discord server.

πŸ§žβ€β™‚οΈ Commands

All commands are run from the root of the project, from a CLI (Terminal):

CommandAction
npm installInstalls dependencies
npm run devStarts local dev server at localhost:3000
npm run buildBuild your production site to ./dist/
npm run previewPreview your build locally, before deploying