Defguard website built on Astro!
Most of the content is written in HTML but some parts ware made with ease of configuration in mind.
Files inside data dare written in JSON format and contain configuration such as what items are shown in navigation and footer. Those configs are data
only and so are not in Markdown
Files that build content on website are written in .mdx
files and are stored in collections within src/content directory.
Every content file begins with special section that defines additional information for that file's context, for example title, order of display etc. You can find definitions of this information inside content.ts.
Pricing is a special case where we need to render MDX directly on client side only, this means importing any components in pricing collection is forbidden because it will not work. Raw HTML is still OK since we render it through rehype-raw.
VSCode is by far the easiest to setup.
To get syntax highlights and all the good stuff, first you need to have installed Node.js and dependencies for this project installed, look in Development
section.
Extensions to install:
Version of Node.js should be the same Major as the one specified in .nvmrc file.
Follow instructions from official site.
Supports using dirreferent version of Node.js for each project.
After correct install, in root of the project use (once):
nvm install
And then:
nvm use
Make sure package manager pnpm is installed. If not use this command to install it:
npm i -g pnpm
Then run install dependencies with:
pnpm install
And then run development server with:
pnpm dev
With correct Node.js environment run:
pnpm build
After that, built project should be in dist
directory inside project root.