dx: Modules are maintainable and documented
Tidy up
tidy(css): Remove relics from the defunct CSS typings
- src/env.d.ts: remove
/// <reference types="./styles.d.ts" />
- clean up Readme
tidy(packages): Remove unneeded packages
- remove vite-plugin-sass-dts
- remove eslint
- remove stylelint-config-standard-scss stylelint-prettier
-
remove
vite-plugin-simple-gql
- upgrade astro and dependencies
fix(dx): Let Biome respect .editorconfig
biome.json:
{ "formatter":
{ "useEditorconfig": true } ,
"files": {
"ignore": ["src/generated/*"]
}
}
Consolidate format
-
.astro files:
- No newlines at the beginning and end of code block (fence)
- 3 newlines after code fence
-
Consistent section heading comments in typescript
May need a future revision...
The Biome formatter does not like multiple newlines. Perhaps multiline section heading comments will make modules more scannable.newlines around section heading comment:
xyz;
/* Helpers */
xyz;
- Format everything with Biome defaults
- Removes multiple empty lines
- Adds newlines for open brackets
- Adds semicolons
Refactor
-
Rename
src/utils/get-directus-graphql-client.ts
->src/utils/api.ts
feat(dx): Wrap style tags in a Style component
Components:
- Style.astro
export type Props = HTMLAttributes<"style"> & {blocks:Block[], global?:boolean};
- [All files that use global styles]
feat(markdown): Write a custom Markdown component
-
Replace the
astropub/md module
with a handwritten component using remark/rehype -
Packages:
- remove @astrojs/mdx
- remove @astropub/md
- remove @astrojs/mdx
- add remark-parse remark-rehype rehype rehype-stringify unified unist-util-visit @types/hast
Components:
- Markdown.astro
- [All files that use markdown]
<Markdown block content={article.content} />
Astro Config:
- remove integration mdx() and markdownIntegration()
- remove markdown {} block
feat(font): Subset our font
Auto-subset and inline Signika[wght] and KavaItalic
Packages:
- add subset-font @types/subset-font
Components:
- Font.astro
- [Font files]
feat(theme): Improve theme modules
Typography module:
-
Allow comma-separated tuple of presets such as
"block, bold"
and make parameter obligatory - Implement block preset with paddings
- Add preset for list item
- Vary letter-spacing and boldness over scale: - Small text is spaced-out and bolder - Large text is compressed and lighter
Color module:
- Generate non-inheriting custom properties for all possible variants
- Update presets
- Improve module structure
feat(component): Render Block_Markdown in Menu
- Show closed items
Link items together to show that they're related or that one is blocking others.
Learn more.