Skip to content

Commit 00d94f1

Browse files
authored
Astro 5 (#262)
* Update getExcerptOfPost function to be async * Update RSS feed to use async compiledContent() * Hack around Integrations change * Remove debug logging from search integration * Move to import.meta.glob() from Astro.glob() Astro.glob() is deprecated in Astro 5 * Upgrade to Astro 5 * Add note about dev server encoding in Astro 5 * README updates * Remove astro-purgecss It doesn’t seem to support Astro 5 * Remove override for astro-purgecss That was what was causing the issue all along. * Fix README typo
1 parent 5de8498 commit 00d94f1

File tree

15 files changed

+2321
-2565
lines changed

15 files changed

+2321
-2565
lines changed

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ Website for the Quilt Project.
44

55
## Contributing
66

7-
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).
7+
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:
8+
- [Why Astro](https://docs.astro.build/en/concepts/why-astro/)
9+
- [Project Structure](https://docs.astro.build/en/basics/project-structure/)
10+
- [Develop and Build](<https://docs.astro.build/en/develop-and-build/>)
11+
- [Routing](https://docs.astro.build/en/guides/routing/)
12+
- [Markdown](https://docs.astro.build/en/guides/markdown-content/) and [MDX](https://docs.astro.build/en/guides/integrations-guide/mdx/#usage)
813

914
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).
1015

@@ -19,7 +24,6 @@ If you would prefer not to use VSCode, you can use any editor that supports a su
1924
- If you want to work with layouts or components, you need an editor with support for .astro files, such as:
2025
- [Sublime Text](https://www.sublimetext.com) with the [Astro extension](https://packagecontrol.io/packages/Astro)
2126
- [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)
22-
- 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)
2327
- 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.
2428
- 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.
2529

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

64+
> [!Note]
65+
> 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.
66+
6067
#### Building the site
6168
To build a full copy of the final site:
6269
```
6370
pnpm build
6471
```
6572
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.
6673

67-
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.
74+
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.
6875

6976
### Previewing with Cloudflare Wrangler
7077
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.
@@ -113,7 +120,7 @@ Your entry must have the following fields:
113120
- `"notes":` (optional) - Any other notes, for example, the a known workaround.
114121

115122
#### Writing a Blog Post
116-
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`.
123+
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`
117124

118125
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:
119126
```yaml

package.json

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,58 +10,56 @@
1010
"clean": "node scripts/clean.mjs"
1111
},
1212
"devDependencies": {
13-
"@astrojs/mdx": "^3.1.5",
14-
"@astrojs/rss": "^4.0.7",
15-
"@astrojs/sitemap": "^3.1.6",
13+
"@astrojs/mdx": "^4.0.3",
14+
"@astrojs/rss": "^4.0.10",
15+
"@astrojs/sitemap": "^3.2.1",
1616
"@types/file-saver": "^2.0.7",
1717
"@types/jsdom": "^21.1.7",
1818
"@types/lunr": "^2.3.7",
1919
"@types/luxon": "^3.4.2",
20-
"@types/prismjs": "^1.26.4",
20+
"@types/prismjs": "^1.26.5",
2121
"@types/semver-compare": "^1.0.3",
2222
"@types/semver-sort": "^0.0.5",
2323
"@types/swagger-ui": "^3.52.4",
24-
"astro": "^4.15.2",
24+
"astro": "^5.1.1",
2525
"astro-i18next": "github:quiltmc/astro-i18next#da5ff6e",
26-
"astro-purgecss": "4.5.0",
2726
"bulma-toast": "^2.4.4",
28-
"execa": "^9.3.1",
27+
"execa": "^9.5.2",
2928
"file-saver": "^2.0.5",
3029
"glob": "^11.0.0",
31-
"hast-util-from-html": "^2.0.2",
32-
"i18next": "^23.14.0",
30+
"hast-util-from-html": "^2.0.3",
31+
"i18next": "^24.2.0",
3332
"i18next-fluent": "^2.0.0",
3433
"i18next-fs-fluent-backend": "github:quiltmc/i18next-fs-fluent-backend",
35-
"jsdom": "^25.0.0",
34+
"jsdom": "^25.0.1",
3635
"jszip": "^3.10.1",
3736
"lunr": "^2.3.9",
38-
"marked": "^14.1.0",
37+
"marked": "^15.0.4",
3938
"node-fetch": "^3.3.2",
4039
"prismjs": "^1.29.0",
4140
"quilt-bulma": "0.0.24",
4241
"rehype-autolink-headings": "^7.1.0",
43-
"rollup": "^4.21.2",
44-
"sass": "^1.77.8",
42+
"rollup": "^4.29.1",
43+
"sass": "^1.83.0",
4544
"semver-compare": "^1.0.0",
46-
"swagger-ui": "^5.17.14",
47-
"typescript": "^5.5.4"
45+
"swagger-ui": "^5.18.2",
46+
"typescript": "^5.7.2"
4847
},
4948
"dependencies": {
50-
"@babel/traverse": "^7.25.6",
51-
"@iconify-json/cib": "^1.2.0",
52-
"@iconify-json/material-symbols": "^1.2.0",
53-
"@iconify-json/mdi": "^1.2.0",
54-
"@tsndr/cloudflare-worker-jwt": "^2.5.3",
55-
"astro-compress": "^2.3.1",
56-
"astro-icon": "^1.1.1",
49+
"@babel/traverse": "^7.26.4",
50+
"@iconify-json/cib": "^1.2.2",
51+
"@iconify-json/material-symbols": "^1.2.12",
52+
"@iconify-json/mdi": "^1.2.2",
53+
"@tsndr/cloudflare-worker-jwt": "^3.1.3",
54+
"astro-compress": "^2.3.5",
55+
"astro-icon": "^1.1.5",
56+
"astro-purgecss": "5.0.0",
5757
"semver-sort": "^1.0.0",
5858
"xml-js": "^1.6.11"
5959
},
6060
"pnpm": {
6161
"overrides": {
62-
"@iconify/tools": "^4.0.0",
63-
"astro-purgecss@>=4.5.0": "4.4.0"
64-
62+
"@iconify/tools": "^4.0.0"
6563
}
6664
},
6765
"engines": {

0 commit comments

Comments
 (0)