Download aside #2152
Closed
JavGuerra
started this conversation in
Feature Requests
Download aside
#2152
Replies: 2 comments
-
Thanks for the feedback. I don't think we have any short-term plans to implement such new aside, but sharing the Starlight Markdown Blocks plugin which can be used to extend Starlight’s Markdown asides syntax with custom block types. You can check the documentation on how to create custom asides but this would basically let you create a custom block type, with a custom icon and color, for downloadable content. // astro.config.mjs
import starlight from '@astrojs/starlight';
import { defineConfig } from 'astro/config';
import starlightMarkdownBlocks, { Aside } from 'starlight-markdown-blocks';
export default defineConfig({
integrations: [
starlight({
title: 'My Docs',
plugins: [
starlightMarkdownBlocks({
blocks: {
download: Aside({ label: 'Download', color: 'blue', icon: '📥' }),
},
}),
],
}),
],
}); After that, you should be able to use the custom block in your Markdown files like this: :::download
Download the latest version of our software.
::: |
Beta Was this translation helpful? Give feedback.
0 replies
-
Great! Thank you. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What version of
starlight
are you using?0.25.2
What is your idea?
Would be appropriate to have an aside for download documents.
Why is this feature necessary?
Sometimes the documentation may be in non-editable formats, such as PDF or others. There may be material that the user needs to download, such as pieces of compiled code...
Do you have examples of this feature in other projects?
Like other asides, but with an appropriate color and icon.
Participation
Beta Was this translation helpful? Give feedback.
All reactions