Forgejo website content - Code of Conduct https://codeberg.org/forgejo/code-of-conduct
2023-01-12 17:04:43 -05:00
.vscode reset theme to https://github.com/onwidget/astrowind 2022-12-01 18:04:49 +01:00
data Add author to frontmatter for the federation FAQs post 2023-01-12 17:04:43 -05:00
public update favicon 2022-12-19 00:44:23 -10:00
src no earl-grey 2022-12-31 11:13:13 +01:00
.editorconfig reset theme to https://github.com/onwidget/astrowind 2022-12-01 18:04:49 +01:00
.eslintignore reset theme to https://github.com/onwidget/astrowind 2022-12-01 18:04:49 +01:00
.eslintrc.js add eslint and prettier 2022-11-11 09:17:39 +01:00
.gitignore ignore emacs backups 2022-11-14 22:09:30 +01:00
.npmrc reset theme to https://github.com/onwidget/astrowind 2022-12-01 18:04:49 +01:00
.prettierignore reset theme to https://github.com/onwidget/astrowind 2022-12-01 18:04:49 +01:00
.prettierrc add eslint and prettier 2022-11-11 09:17:39 +01:00
.woodpecker.yml ci: use pnpm with lockfile 2022-12-08 21:59:25 -10:00
astro.config.mjs remove unused reading time functionality 2022-12-12 22:28:50 -10:00
package.json remove unused reading time functionality 2022-12-12 22:28:50 -10:00
pnpm-lock.yaml remove unused reading time functionality 2022-12-12 22:28:50 -10:00
README.md update README and remove unused files 2022-12-06 01:30:56 -10:00
sandbox.config.json reset theme to https://github.com/onwidget/astrowind 2022-12-01 18:04:49 +01:00
tailwind.config.cjs implement dark mode toggle with native fallback 2022-12-13 01:34:35 -10:00
tsconfig.json Merge branch 'main' into 'wip-astrowind' 2022-12-06 01:17:23 -10:00

Website for Forgejo

This website is built with Astro and Tailwind CSS, and is based on the AstroWind template.

Project structure

The following is the default structure of the AstroWind template:

/
├── data/
|   └── blog/
|       ├── post-slug-1.md
|       ├── post-slug-2.mdx
|       └── ...
├── public/
│   ├── robots.txt
│   └── favicon.ico
├── src/
│   ├── assets/
│   │   ├── images/
|   |   └── styles/
|   |       └── base.css
│   ├── components/
│   │   ├── atoms/
│   │   ├── blog/
│   │   ├── core/
|   |   └── widgets/
|   |       ├── Header.astro
|   |       ├── Footer.astro
|   |       └── ...
│   ├── layouts/
│   |   |── BaseLayout.astro
│   |   └── ...
│   ├── pages/
│   |   ├── [...blog]/
|   |   |   ├── [...page].astro
|   |   |   └── [slug].astro
│   |   ├── [...categories]/
|   |   |   └── [category]/
|   |   |       └── [...page].astro
│   |   ├── [...tags]/
|   |   |   └── [tag]/
|   |   |       └── [...page].astro
│   |   ├── index.astro
|   |   ├── 404.astro
|   |   └-- rss.xml.js
│   ├── utils/
│   └── config.mjs
├── package.json
└── ...

Astro looks for .astro or .md 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.

Any static assets, like images, can be placed in the public/ directory if they do not require any transformation or in the assets/ directory if they are imported directly.

Commands

All commands are run from the root of the project, from a terminal:

Command Action
pnpm install Installs dependencies
pnpm run dev Starts local dev server at localhost:3000
pnpm run build Build your production site to ./dist/
pnpm run preview Preview your build locally, before deploying
pnpm run format Format codes with Prettier
pnpm run lint:eslint Run Eslint
pnpm run astro ... Run CLI commands like astro add, astro preview

See the AstroWind docs for more information.