Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pauby/chroma-powershellconsole-css
PowerShell Console CSS for the Chroma Syntax Highlighter (as used by Hugo)
https://github.com/pauby/chroma-powershellconsole-css
chroma css hugo powershell
Last synced: 28 days ago
JSON representation
PowerShell Console CSS for the Chroma Syntax Highlighter (as used by Hugo)
- Host: GitHub
- URL: https://github.com/pauby/chroma-powershellconsole-css
- Owner: pauby
- License: mit
- Created: 2017-10-18T13:01:55.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-26T17:56:57.000Z (almost 7 years ago)
- Last Synced: 2025-01-06T16:13:45.452Z (about 1 month ago)
- Topics: chroma, css, hugo, powershell
- Language: CSS
- Size: 3.91 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# chroma-powershellconsole-css
PowerShell Console CSS for the Chroma Syntax Highlighter (as used by [Hugo](https://gohugo.io))
This is a stylesheet you can use with [Chroma](https://github.com/alecthomas/chroma) to create code sections in the style of the PowerShell default console window.
To use (for Hugo):
1. Set `pygmentsUseClassic` to `false` (or remove it entirely as Hugo defaults to Chroma);
2. Set `pygmentsUseClasses` to `true` (this allows the CSS stylesheet to work);
3. Put the `chroma-powershellconsole.css` stylesheet into `static\css` in your Hugo site;
4. Add loading the `css\chroma-powershellconsole.css` into the of your page (using for example `
{{< highlight powershell "hl_lines=3-5" .}}
PS> Some codeSome error text
that spills onto multiple
lines
{{< / highlight }}// Your post markdown
```Make sure you have the
tag before the code block. Then highlight those lines you want to appear as error messages using the [hl_lines option in Hugo](https://gohugo.io/content-management/syntax-highlighting/#configure-syntax-hightlighter). Don't forget to close thetag.What this does it restyle the highlighted code to appear as error styled text. However for each code block you can't have highlighted text and error styled text. You get one or the other.
You could used a shortcode for this in Hugo if you wanted. This is just the CSS. How you implement it is entirely up to you!