A VS Code extension to easily add Hugo marker shortcodes for underlining text in Markdown files.
This extension provides a context menu option to wrap selected text with Hugo marker shortcodes. It supports four colors: yellow, blue, red, and green.
- Select the text you want to underline in your Markdown file.
- Right-click to open the context menu.
- Choose the marker color you want:
- Marker Yellow
- Marker Blue
- Marker Red
- Marker Green
The extension will wrap the selected text with the corresponding Hugo shortcode, for example:
{{< marker yellow >}}Your selected text{{< /marker >}}
{{< marker blue >}}Your selected text{{< /marker >}}
{{< marker red >}}Your selected text{{< /marker >}}
{{< marker green >}}Your selected text{{< /marker >}}
- Install the extension from the VS Code Marketplace or manually from a VSIX file.
- Open VS Code
- Go to the Extensions view by clicking the square icon in the Activity Bar on the side of the window.
- Search for "Hugo Marker Shortcodes"
- Click Install
- Download the
.vsix
file. - Open VS Code
- Go to the Extensions view by clicking the square icon in the Activity Bar on the side of the window.
- Click on the three dots (More Actions) in the top-right corner.
- Select
Install from VSIX...
- Select the downloaded
.vsix
file
- Node.js
- yarn
- vsce (Visual Studio Code Extension Manager)
-
Clone the repository:
git clone https://github.com/dwchiang/hugo-marker-shortcodes.git cd hugo-marker-shortcodes
-
Install dependencies:
yarn install
-
Build the extension:
yarn run compile
-
Package the extension:
vsce package
This will create a .vsix
file that you can install in VS Code.
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
This project is licensed under the MIT License.