Markdown frontmatter
Doc link.
Markdown
**bold**
- bold
_italic*
- italic
~~strikethrough~~
- strikethrough
[link to home page](../../)
- link to homepage
![image-alt-text](../../assets/profile.jpeg)
-
[link to markdown headings](#markdown)
- link to markdown headings
Table
Syntax | Description |
---|
Header | Title |
Paragraph | Text |
Blockquote
Blockquote used when quoting other people.
Use ’>’ at the start of line.
Here’s a sentence with a footnote. 1
Definition List
- First Term
- This is one definition of the second term.
- This is another definition of the second term.
Task list
Starlight Components
Asides/Admonitions/Callouts
Details/Accordion
Use to hide content that is not immediately relevant. Users can click >
to see the details.
Use standard HTML detail, summary tag.
Here is more detailed information about this.
Code Blocks
Expressive Code rehype plugin used for this.
Shiki
Shiki used for syntax highlighting.
List of all supported languages.
title/frame
-
Terminal window - Provide title
with file name to create terminal like window.
-
Code editor window - For title
without a file name, the code editor window would be created.
-
Control the frame type by providing frame
argument (code
, terminal
, none
, auto
).
Text and Line markers
-
Mark lines for highlighting
{4}
- single line
{4, 8, 10}
- three lines
{4-8}
- range of lines
-
Type of markers
-
Add single character labels to side of line markers to help with referencing specific parts of code.
-
Add long labels on separate lines. For this, leave an empty line above the marked line range.
-
Use GitHub diff
syntax. Add +
, -
to mark lines that are inserted and deleted.
For syntax highlighting, provide the language using lang="js"
.
-
Mark text or regular expression in the code block.
Wrap lines
Add wrap
or wrap=true
to wrap code block and prevent horizontal scrolling.
By default, the wrapped line will start at the same indentation as the original line.
To wrap lines to the start i.e. column 1, add preserveIndent=false
. This is useful to reproduce terminal output.
Example, with wrapped line starting from column 1
Collapsible sections
Collapse the provided line number ranges. This helps reduce long code examples to relevant parts.
Line numbers
showLineNumbers=false
- to hide
startLineNumbers=5
Custom theme
Instruction to create personal theme.
Site Search
PageFind is used.
Add pagefind: false
in markdown frontmatter to exclude page from search index.
Exclude parts of the page using
Docs link.
Internal links
Internal links to pages need to be relative to src/content/docs
with slug
property.
Or the shorthand without slug
Other links
For internal links, it is better to provide label
info from the frontmatter.
Groups
Collapse by providing collapsed: true
.
Autogenerate groups
The collapsed
value of parent is used, if none is provided.
Badges
Display a small badge next to sidebar label. This can convey information like “New”, “Outdated”.
Use the following variants note
, tip
, danger
, caution
, success
.