Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Astro 5 #262

Merged
merged 12 commits into from
Dec 30, 2024
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ Website for the Quilt Project.

## Contributing

This site built with [Astro](https://astro.build), [MDX](https://mdxjs.com), and [i18next](https://www.i18next.com). It is hosted on [Cloudflare Pages](https://developers.cloudflare.com/pages/). If you want to get more familiar with Astro, you can read [its documentation](https://docs.astro.build).
This site is built with [Astro](https://astro.build), [MDX](https://mdxjs.com), and [i18next](https://www.i18next.com). It is hosted on [Cloudflare Pages](https://developers.cloudflare.com/pages/). If you want to get more familiar with Astro, you can read [its documentation](https://docs.astro.build). The following articles from the documentation explain how Astro works without being tutorials for anything specific:
- [Why Astro](https://docs.astro.build/en/concepts/why-astro/)
- [Project Structure](https://docs.astro.build/en/basics/project-structure/)
- [Develop and Build](<https://docs.astro.build/en/develop-and-build/>)
- [Routing](https://docs.astro.build/en/guides/routing/)
- [Markdown](https://docs.astro.build/en/guides/markdown-content/) and [MDX](https://docs.astro.build/en/guides/integrations-guide/mdx/#usage)

If you get stuck or have questions, please join us in the [`#Website`](https://discord.com/channels/817576132726620200/1103986836415713300) thread on our [Discord server](https://discord.quiltmc.org).

Expand All @@ -19,7 +24,6 @@ If you would prefer not to use VSCode, you can use any editor that supports a su
- If you want to work with layouts or components, you need an editor with support for .astro files, such as:
- [Sublime Text](https://www.sublimetext.com) with the [Astro extension](https://packagecontrol.io/packages/Astro)
- [Neovim](https://neovim.io) with [tree-sitter-astro](https://github.com/virchau13/tree-sitter-astro) and the [Astro lspconfig](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#astro)
- JetBrains [IntelliJ IDEA Ultimate](https://www.jetbrains.com/idea/) or [WebStorm](https://www.jetbrains.com/webstorm/) with the [Astro extension](https://plugins.jetbrains.com/plugin/20959-astro)
- If you want to work with more complex pages, you may want an editor with support for MDX, though many editors with Markdown support render MDX fairly accurately.
- If you want work with the i18n system, you may want an editor with support for [Fluent](https://projectfluent.org). However, this isn't strictly necessary if you only want to translate the website.

Expand Down Expand Up @@ -57,14 +61,17 @@ Astro includes a development server that automatically reloads itself as you cha
```
The dev server builds pages as you visit them to reduce start time, so its performance is worse than the fully built site.

> [!Note]
> In Astro 5, the dev server has introduced some strange encoding issues, like displaying apostrophes as "’". These issues do not appear in the finally built site.

#### Building the site
To build a full copy of the final site:
```
pnpm build
```
The site will be built into the `dist/` folder. Building the site is a useful way to check that you haven't broken anything without noticing.

You can preview the built site using `pnpm astro preview`, but in most cases the only advantage this has over the dev server is performance.
You can preview the built site using `pnpm astro preview`. This has similar performance to the production website, and avoids the strange encoding issues that the dev server seems to have.

### Previewing with Cloudflare Wrangler
If you need to test Cloudflare Pages-specific functionality (such as anything in the `functions/` directory), you can preview the site using Cloudflare's [Wrangler CLI](https://developers.cloudflare.com/workers/wrangler/)to emulate a Cloudflare Pages deployment.
Expand Down Expand Up @@ -113,7 +120,7 @@ Your entry must have the following fields:
- `"notes":` (optional) - Any other notes, for example, the a known workaround.

#### Writing a Blog Post
Create a new Markdown file in `src/pages/en/blog`, named with the current date and a shortened version of the title. The date should be in the format `yyyy-mm-dd`, and the title should be in lowercase and separated by hyphens (`-`), for example, `2024-03-09-example-post.md`.
Create a new Markdown file in `src/pages/en/blog`, named with the current date and a shortened version of the title. The date should be in the format `yyyy-mm-dd`, and the title should be in lowercase and separated by hyphens (`-`), for example, `2024-03-09-example-post.md`. The file *must* end with `.md` and *not* `.mdx`

At the top of the file, you need to add *front matter*, which is metadata written in YAML. The front matter for a blog post looks like this:
```yaml
Expand Down
48 changes: 23 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,58 +10,56 @@
"clean": "node scripts/clean.mjs"
},
"devDependencies": {
"@astrojs/mdx": "^3.1.5",
"@astrojs/rss": "^4.0.7",
"@astrojs/sitemap": "^3.1.6",
"@astrojs/mdx": "^4.0.3",
"@astrojs/rss": "^4.0.10",
"@astrojs/sitemap": "^3.2.1",
"@types/file-saver": "^2.0.7",
"@types/jsdom": "^21.1.7",
"@types/lunr": "^2.3.7",
"@types/luxon": "^3.4.2",
"@types/prismjs": "^1.26.4",
"@types/prismjs": "^1.26.5",
"@types/semver-compare": "^1.0.3",
"@types/semver-sort": "^0.0.5",
"@types/swagger-ui": "^3.52.4",
"astro": "^4.15.2",
"astro": "^5.1.1",
"astro-i18next": "github:quiltmc/astro-i18next#da5ff6e",
"astro-purgecss": "4.5.0",
"bulma-toast": "^2.4.4",
"execa": "^9.3.1",
"execa": "^9.5.2",
"file-saver": "^2.0.5",
"glob": "^11.0.0",
"hast-util-from-html": "^2.0.2",
"i18next": "^23.14.0",
"hast-util-from-html": "^2.0.3",
"i18next": "^24.2.0",
"i18next-fluent": "^2.0.0",
"i18next-fs-fluent-backend": "github:quiltmc/i18next-fs-fluent-backend",
"jsdom": "^25.0.0",
"jsdom": "^25.0.1",
"jszip": "^3.10.1",
"lunr": "^2.3.9",
"marked": "^14.1.0",
"marked": "^15.0.4",
"node-fetch": "^3.3.2",
"prismjs": "^1.29.0",
"quilt-bulma": "0.0.24",
"rehype-autolink-headings": "^7.1.0",
"rollup": "^4.21.2",
"sass": "^1.77.8",
"rollup": "^4.29.1",
"sass": "^1.83.0",
"semver-compare": "^1.0.0",
"swagger-ui": "^5.17.14",
"typescript": "^5.5.4"
"swagger-ui": "^5.18.2",
"typescript": "^5.7.2"
},
"dependencies": {
"@babel/traverse": "^7.25.6",
"@iconify-json/cib": "^1.2.0",
"@iconify-json/material-symbols": "^1.2.0",
"@iconify-json/mdi": "^1.2.0",
"@tsndr/cloudflare-worker-jwt": "^2.5.3",
"astro-compress": "^2.3.1",
"astro-icon": "^1.1.1",
"@babel/traverse": "^7.26.4",
"@iconify-json/cib": "^1.2.2",
"@iconify-json/material-symbols": "^1.2.12",
"@iconify-json/mdi": "^1.2.2",
"@tsndr/cloudflare-worker-jwt": "^3.1.3",
"astro-compress": "^2.3.5",
"astro-icon": "^1.1.5",
"astro-purgecss": "5.0.0",
"semver-sort": "^1.0.0",
"xml-js": "^1.6.11"
},
"pnpm": {
"overrides": {
"@iconify/tools": "^4.0.0",
"astro-purgecss@>=4.5.0": "4.4.0"

"@iconify/tools": "^4.0.0"
}
},
"engines": {
Expand Down
Loading
Loading