Features
All basic features supported…
The Ion template supports all features from the base Starlight template. This even applies to collapsing groups, although they are handled a little different from the normal collapsing groups. To see this Theme’s groups in action, select the Example Guide in the sidebar.
If you want to remove the sidebar that comes with this template, simply comment out the sidebar component override
in the astro.config.mjs
file:
This, of course, goes for any of the component overrides in this theme. If you’d like to re-enable themes, simply comment out this part:
As for the colors, you can edit them using the CSS variables in the theme.css
file:
Directorynode_modules/
- …
Directorypublic/
- …
Directorysrc/
Directoryassets/
- …
Directorycomponents/
- …
Directorycontent/
- …
Directoryicons/
- …
Directoryschemas/
- …
Directorystyles/
- theme.css
- …
- …
- …
… and more ontop!
In addition to the default features & design of starlight, a couple of other things that might be useful have been added.
Footer
The Pagination component override doesn’t actually remove or change anything, it only adds a footer below the pagination. If you want to keep this footer, and want to modify it’s contents, head over to this file:
Directorynode_modules/
- …
Directorypublic/
- …
Directorysrc/
Directoryassets/
- …
Directorycomponents/
- Pagination.astro
Directorycontent/
- …
- …
- …
To edit the footer, simply put your own text, icons and code into the footer:
Sidebar Icons
As mentioned before, the sidebar has received a big overhaul with this theme. To add to the new style, there’s now an easy way to add Icons to any group or link.
Groups
Since this theme doesn’t show lower-level groups and instead expects you to have markdown files with the same slug as the folder, only top-level groups are supported. This is how you add any SVG as an icon to a top-level group:
-
Create a .astro file for the SVG
To add an icon, head over to the icons directory:
Directorynode_modules/
- …
Directorypublic/
- …
Directorysrc/
Directoryassets/
- …
Directorycomponents/
- …
Directorycontent/
- …
Directoryicons/
- …
- …
- …
-
Create a new .astro file, with the filename as the name of the icon:
Directorynode_modules/
- …
Directorypublic/
- …
Directorysrc/
Directoryassets/
- …
Directorycomponents/
- …
Directorycontent/
- …
Directoryicons/
- rocket.astro
- …
- …
-
Put the SVG code into the newly created file:
-
Reference the icon in your
astro.config.mjs
:
Links / Files
For individual links specified in your astro.config.mjs
, you can add icons the same way as groups. For files,
you can simply reference the icon in the Frontmatter title:
Header Badges I'm a Badge!
Starlight provides a way for you to add badges to items in the sidebar. This is great for drawing attention to certain links. Often times, this is used to show that something has been updated. However, when following the link, there is no way to tell which part of the page has been updated.
To combat this, the Ion theme ships with a <HeaderBadge />
component! To use it, simply add it behind any header, like so:
Finishing up
Thanks for using the Ion theme! Feel free to delete this file, or keep it around if you want to check out the included features again. If you like this theme, you can give it a Star on GitHub, and if you feel inclined to, you can become one of my Patreon members.
You’ll be featured on my Homepage!