Releases: ArmandPhilippot/apeu
v2.1.1
Patch Changes
-
1fb74d1: Fixes a regression where the build was failing because of environment variables.
In some context such as Docker, the build was failing because environment variables were validated too early. The fix is to revert the changes related to
CONTENT_PATH. If you need a different content path, you must pass it before thedevorbuildcommand:CONTENT_PATH="./custom-directory" pnpm dev
v2.1.0
Minor Changes
-
b31f96a: Uses Satori to generate OpenGraph images.
The
astro-og-canvaspackage is great, but I'd like to be able to customize a bit more the OpenGraph image in the future. So, this replaces it withsatori-astroandsatori-html. For now, the generated images should remain essentially the same. -
e87b10f: Switches to Astro built-in type-safe environment variables
Previously, some environment variables such as the SMTP credentials were using
process.env. This required to use tools likedotenvxto load them from a.envfile. Using Astro built-in features, they are now directly loaded which should improve DX. This also means providing those environment variables is now required and a build will fail if they are not set. -
10e2011: Enables Astro's experimental queue rendering.
-
dca9396: Upgrades to Astro v6 and Vite v7.
-
10e2011: Enables Astro's experimental Rust compiler.
Patch Changes
-
b31f96a: Uses Bunny as font provider instead of Fontsource.
Satori doesn't support
.woff2fonts and Fontsource doesn't seem to support Inter in.woffformat. To fix this issue, I swap the font provider to Bunny. -
b31f96a: Uses
.wofffonts instead of.woff2.Satori doesn't support
.woff2fonts. To avoid downloading the Inter font twice, I swapped the default font format (.woff2) with.woff. This is only effective for the regular font, not for the monospace font. -
b31f96a: Uses the SEO description for OpenGraph images when available.
The OG images used the regular description, the one that is generally used for display on the website. Those descriptions are not always suited to display on external websites. To fix that, the OG images now use the SEO description when available.
v2.0.5
Patch Changes
-
44b624e: Adds Bluesky, WhatsApp, and email as social media links allowed for authors
Support for those social media was already configured but the
authorscollection was missing the matching properties insocialMedia. If you use any of those social media, you can now update your author file to include them:{ "firstName": "John", "lastName": "Doe", "socialMedia": { + "bluesky": "https://bsky.app/profile/your.handle", + "email": "mailto:dontSpamMe@example.test", "github": "https://github.com/YourHandle", + "whatsapp": "whatever-the-format-is", }, /* ... */ }
v2.0.4
v2.0.3
v2.0.2
Patch Changes
-
87241c1: Refines layout by adjusting spacings and sizes.
-
6f5c169: Prevents the search form button to be misaligned on larger viewports.
-
87241c1: Improves the cover rendering on content pages.
-
87241c1: Cleans up unused code that should have been removed in v2.
In v2, the
disconnectedslot has been transferred from the page layout to theContentPagecomponent but this is no longer used and should have been removed. -
e4ce9fe: Fixes cards ordering on listing pages.
v2.0.1
Patch Changes
-
54f960d: Fixes styles on the search page view.
The
search-view.astroview no longer uses CSS Cascade Layers because, with them, Pagefind overrides the custom styles. -
b794178: Hides the search form when JavaScript is disabled.
The search form requires JavaScript to work. To prevent any frustration and to be consistent with how themes and language controls are rendered, the search form is no longer visible in the navbar when JavaScript is disabled.
-
0ab0667: Fixes inconsistent use of inline borders on small viewports.
The
Cardcan now adapt its styles based on the viewport or the container width preventing inline borders to be visible when edge-to-edge style is expected. -
c393d58: Improves focus styles on various elements.
v2.0.0
Major Changes
-
264c079: Divides the pages collection in two:
pagesandindex.pages.The
pagescollection contained both regular pages and index pages. This was makingindex.mdpage identification harder. To work around that issue, the collection has been divided in two:pagesandindex.pages.If you were using the previous behavior to fetch all the pages at once, you'll need to update your queries:
-await queryCollection("pages"); +await queryCollection(["index.pages", "pages"]);
If you were requesting a single page while targeting an index page, you'll need to update the collection name:
-await queryEntry("pages", "directory-name"); +await queryEntry("index.pages", "directory-name");
-
5466b80: Drops support for Node v18.
Node v18 reaches end of life on 2025-04-30 and some other packages, like nanostores, have already dropped its supports. A version greater or equal to v20 is now required.
-
e225f9d: Refactors CSS tokens.
This is mostly an internal change but if you were extending this template using existing CSS tokens, you might need to update your project. All
subtleandfadedcolor variants have been replaced withlowandhigh. In addition, some colors have been removed or replaced with new colors.Please check your styles and make the necessary changes. For example:
- color: var(--color-black-subtle); + color: var(--color-slate-high); - color: var(--color-black-faded); + color: var(--color-slate-low);
-
264c079: Replaces the
routehelper fromuseI18nwithuseRouting.Routes are no longer handled statically in a translation file but dynamically in an index built from data provided in your content directory. Because of that, the
routeproperty has been removed from the object returned byuseI18n().If you need to display a route in your templates, you'll need to import and use the
useRouting()utility instead. This returns an object containing arouteById()helper that uses a similar API thanroute().--- import { useI18n } from "../../../services/i18n"; +import { useRouting } from "../../../services/routing"; -const { locale, route, translate } = useI18n(Astro.currentLocale); +const { locale, translate } = useI18n(Astro.currentLocale); +const { routeById } = await useRouting(locale); +const homeRoute = routeById("home"); +const blogRoute = routeById("blog"); const mainNav = [ { icon: "home", iconSize: 28, - label: translate("page.home.title"), + label: homeRoute.label, - url: route("home"), + path: homeRoute.path, }, { icon: "blog", iconSize: 28, - label: translate("page.blog.title"), + label: blogRoute.label, - url: route("blog"), + path: blogRoute.path, }, ]; ---
The route label is based on the title you defined in your Markdown file. If this title is not suitable as a route label, you can continue to use your own label.
-
e225f9d: Adds support for CSS Cascade Layers.
This projects now use Cascade Layers and provide the following layers:
@layer reset, themes, tokens, base, atoms, molecules, organisms, layout, views, utils;
-
264c079: Reverts ids generation of collection entries to Astro default behavior.
The routing logic changes has introduced a breaking change regarding generated ids. Previously, some ids were rewritten to be able to use shorter references in the frontmatter. The references ids now use the default format generated by Astro.
If you were relying on references (
category,tagsori18n) in your content files, you'll need to update them to use the "full path" instead of the shorten one:--- title: Post 1 description: "This is an excerpt of post 1." publishedOn: "2024-11-10T17:32" -category: "en/category1" +category: "en/blog/categories/category1" authors: - "armand-philippot" tags: - - "en/tag1" + - "en/tags/tag1" i18n: - fr: fr//post1 + fr: fr/blog/posts/post1 seo: title: "Post 1" description: "This is a description used by search engines." ---
-
7099af0: Replaces the
component-storiesintegration with a newastro-storiesintegration.This is a breaking change related to stories writing. Instead of using
.astrofiles, you should now write your stories using MDX. In addition, you no longer need to write the stories indexes yourself! This improves the authoring experience and offers more flexibility to store the stories.Your component/view stories can stay in the same place as before but you'll need to convert them to MDX. The following frontmatter properties are supported:
title: to define the title of your storywrapInLayout: false: to prevent the story to be wrapped in a layout, useful for stories related to the global layout.wrapInContentPage: false: to prevent the story to be wrapped in aContentPagecomponent, useful for stories related to page layouts.
If you had stories in
src/pages/_dev_design-system, you'll need to convert them to MDX and to move them tosrc/stories.When writing a story, you can use
.stories.mdxas extension to keep the file alongside your components and views, or use.mdxin astoriesdirectory in your source directory. Anystoriesdirectory will be automatically stripped, except if you have a component in a directory namedstories. -
264c079: Adds a
permaslugfrontmatter property to localize the routes.This project no longer localize routes in French for you. A
permaslugproperty has been introduced to let you define the translation by yourself in the frontmatter of your content files.If you were relying on automatic translation for your routes, you'll need to update your files. For example, given a route
/en/blog/posts/post-1previously localized in French as/blog/articles/post-1, you will need to update yourcontent/fr/blog/posts/index.mdxfile to include apermaslug:--- title: Articles description: "C'est un extrait de la page d'index des articles du blog." publishedOn: "2024-12-19T14:51" seo: title: "Articles" description: "Il s'agit d'une description utilisée par les moteurs de recherche." i18n: en: "en/blog/posts" +permaslug: "articles" ---
Then, if you want to also localize
post-1, you can either translate the filename or use apermaslugin yourcontent/fr/blog/posts/post-1.mdxfile (e.g.permaslug: article-1).
Minor Changes
-
80ad823: Prefixes local storage variables to avoid conflicts in dev mode.
If users have already set a theme for the website or code blocks, they will need to configure it again due to the prefix change.
-
7a5cba1: Moves some helpers from
utilstoservicesand renames some of them.Those changes are mostly internals and shouldn't break anything, but if you were using this project as a template you might be interested in the following changes because of the paths update.
Some helpers were defined in
src/utilsand have been moved tosrc/servicesto make the distinction between generic and feature-specific helpers clearer. This will also make splitting the files easier if needed in the future when a feature grows.If you had templates relying on those helpers, you need to update your code.
For example, feeds and i18n helpers were previously located respectively in
src/utils/feedsandsrc/utils/i18n.ts. They have been moved tosrc/services/feedsandsrc/services/i18n:--- -import { getFeedLanguageFromLocale, getRSSItemsFromEntries } from "../utils/feeds"; -import { isAvailableLanguage, useI18n, type AvailableLanguage } from "../utils/i18n"; -import { getWebsiteUrl } from "../utils/url"; +import { getFeedLanguageFromLocale, getRSSItemsFromEntries } from "../services/feeds"; +import { useI18n } from "../services/i18n"; +import type { AvailableLocale } from "../types/tokens"; +import { WEBSITE_URL } from "../utils/constants"; +import { isAvailableLocale } from "../utils/type-guards"; ---
-
7099af0: Adds new components:
SelectField,Section, andCodePreview. -
e225f9d: Replaces some components.
This is mostly an internal change but if you were extending this template you might need to update your code. This replaces:
LanguagePickerwithLanguageSelectSkipTowithSkipLinkSwitchwithThemeSwitchThemeSettingwithThemeSelectCollectionCardwith a more generic named componentPreviewCardCollectionMetawith a more generic component namedMetaPagewithContentPageandListingPage
-
264c079: Renames
blogPostsandblogCategoriescollections respectively toblog.postsandblog.categories.This project already uses a dot separated format for tokens (i18n, icons). Collections names are also tokens and should follow the same pattern. This change will also help simplify some development logic.
-
e225f9d: Replaces themes colors.
The colors of both themes have been updated. The most noticeable changes are related to the Dark theme which is darker than before. This should also improve the rendering when using desktop programs such as Redshift.
-
e225f9d: Removes some components:
Box,Item,Fieldset,Legend,Heading,License,BackTo,NavItem,NavList,Popover,RadioItem,RadioGroup,Toggle,SvgFiltersProvider,PageLayout.This changes is mostly internal, but if you were using this project as template you might nee...
v1.0.5
v1.0.4
Patch Changes
-
1099999: Enables the customization of the cover position for content collections that supports a cover.
A new
positionproperty is available in thecoverobject for content collections accepting a cover. The value should match the tokens supported by the CSSobject-positionproperty (only strings liketop,left, etc. are supported). -
1099999: Removes alt text for decorative images.
The collections entries using a
coverno longer accepts analtproperty to define the alternative text of the images. Those are purely decorative so they shouldn't be announced to screen readers. -
a49c607: Fixes an issue where pagination styles was overridden by other styles in production.
The CSS order seems a bit inconsistent between development and production modes. The style for pagination links was not correctly applied to the built website.
-
1099999: Readjusts the cover dimensions.
-
6165c62: Removes links pointing to the current page.
Some pages (tags, categories) was linking to themselves. This removes those useless links.