Theming for the website comes from builtin Shiki themes found in Expressive Code. You can view them here. A website can have one or more themes, defined in src/site.config.ts. There are three theming modes to choose from:
single: Choose a single theme for the website. Simple.
light-dark-auto: Choose two themes for the website to use for light and dark mode. The header will include a button for toggling between light/dark/auto. For example, you could choose github-dark and github-light with a default of "auto" and the user’s experience will match their operating system theme straight away.
select: Choose two or more themes for the website and include a button in the header to change between any of these themes. You could include as many Shiki themes from Expressive Code as you like. Allow users to find their favorite theme!
When the user changes the theme, their preference is stored in localStorage to persist across page navigation.
In life, as in art, some endings are bittersweet. Especially when it comes to love. Sometimes fate throws two lovers together only to rip them apart. Sometimes the hero finally makes the right choice but the timing is all wrong. And, as they say, timing is everything.
To add your own character, first add an image file to the top-level /public directory in your cloned MultiTerm repo. Astro cannot automatically optimize image assets from markdown plugins, so make sure to compress the image to a web-friendly size (<100kb).
I recommend Google’s free Squoosh web app for creating super small webp files. The characters here have been resized to 300 pixels wide and exported to webp with 75% quality using Squoosh.
After you’ve added your image, update the characters option in site.config.ts with your newly added image file and restart the development server.
When there are multiple character chats in a row, the order of the chat image and chat bubble reverses to give the chat more of a back-and-forth appearance.
Emojis can be added in markdown by including a literal emoji character or a GitHub shortcode. You can browse an unofficial database here.
Example markdown with GitHub emoji shortcodes
Good morning! :sleeping: :coffee: :pancakes:
Good morning! 😴☕🥞
All emojis (both literal and shortcoded) are made more accessible by wrapping them in a span tag like this:
<spanrole="img"aria-label="coffee">☕️</span>
At the time of writing, emoji v16 is not supported yet. These emojis can be included literally but they do not have shortcodes and will not be wrapped.