Anchors
Anchors
Create Anchors automatically with AnchorJS.
Overview
Choco-theme uses AnchorJS for the addition of automatic deep anchors. The anchors can be identified by hovering over an element in the list below. When hovering, a blue link icon will appear to the left of the linked item.
The items inside below are automatically deep linked while written in HTMl or Markdown:
<h2>
<h3>
<h4>
<h5>
<h6>
- A
<li>
that contains a<strong>
tag at the very beginning. - A
<li>
that contains a<code>
tag at the very beginning.
Initiating AnchorJS
To initiate AnchorJS, items must be wrapped in a container with the class .anchorjs-container
. Any Chocolatey Software website that uses AnchorJS already contains the .anchorjs-container
class on the layout and it does not need to be added again.
AnchorJS Example in HTML
H2 Heading HTML
H3 Heading HTML
H4 Heading HTML
H5 Heading HTML
H6 Heading HTML
choco install
- This starts with a<code>
element.- Chocolatey Central Management - This starts with a
<strong>
element.
AnchorJS Example in Markdown
H2 Heading Markdown
H3 Heading Markdown
H4 Heading Markdown
H5 Heading Markdown
H6 Heading Markdown
choco upgrade
- This starts with a<code>
element.- Chocolatey GUI - This starts with a
<strong>
element.
Markdown
:::{.anchorjs-container}
## H2 Heading Markdown
### H3 Heading Markdown
#### H4 Heading Markdown
##### H5 Heading Markdown
###### H6 Heading Markdown
* `choco upgrade` - This starts with a `<code>` element.
* **Chocolatey GUI** - This starts with a `<strong>` element.
:::