{"id":16480864,"url":"https://github.com/pauby/chroma-powershellconsole-css","last_synced_at":"2026-04-09T16:45:06.426Z","repository":{"id":73243560,"uuid":"107408902","full_name":"pauby/chroma-powershellconsole-css","owner":"pauby","description":"PowerShell Console CSS for the Chroma Syntax Highlighter (as used by Hugo)","archived":false,"fork":false,"pushed_at":"2018-04-26T17:56:57.000Z","size":4,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T04:39:00.029Z","etag":null,"topics":["chroma","css","hugo","powershell"],"latest_commit_sha":null,"homepage":null,"language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pauby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-18T13:01:55.000Z","updated_at":"2018-06-14T15:19:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"21280a4e-277f-4e8e-a7ca-ab035f034bcc","html_url":"https://github.com/pauby/chroma-powershellconsole-css","commit_stats":{"total_commits":5,"total_committers":2,"mean_commits":2.5,"dds":0.4,"last_synced_commit":"178d9632c79e4f7e1a4763dbe58f225864ec9192"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauby%2Fchroma-powershellconsole-css","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauby%2Fchroma-powershellconsole-css/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauby%2Fchroma-powershellconsole-css/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauby%2Fchroma-powershellconsole-css/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pauby","download_url":"https://codeload.github.com/pauby/chroma-powershellconsole-css/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241192347,"owners_count":19925307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chroma","css","hugo","powershell"],"created_at":"2024-10-11T13:05:36.436Z","updated_at":"2026-04-09T16:45:01.382Z","avatar_url":"https://github.com/pauby.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chroma-powershellconsole-css\n\nPowerShell Console CSS for the Chroma Syntax Highlighter (as used by [Hugo](https://gohugo.io))\n\nThis 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.\n\nTo use (for Hugo):\n\n1. Set `pygmentsUseClassic` to `false` (or remove it entirely as Hugo defaults to Chroma);\n2. Set `pygmentsUseClasses` to `true` (this allows the CSS stylesheet to work);\n3. Put the `chroma-powershellconsole.css` stylesheet into `static\\css` in your Hugo site;\n4. Add loading the `css\\chroma-powershellconsole.css` into the \u003chead\u003e of your page (using for example `\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"/css/chroma-powershellconsole.css\"`);\n\nThat's it.\n\nLet me know of any suggestions or issues. PR's are welcome.\n\n## How To Have Error Messages Display In Your Code In Hugo\n\nThe Chroma lexers (or the Pygments ones that they are based on) don't detect error messages in your PowerShell code text so I've added styling of error lines like the PowerShell console. To have them displayed properly use this in your post:\n\n```\n// Your post markdown\n\n\u003cdiv id=\"pscode-highlight-error\"\u003e \n{{\u003c highlight powershell \"hl_lines=3-5\" .}}\nPS\u003e Some code\n\nSome error text\nthat spills onto multiple\nlines\n{{\u003c / highlight }}\n\u003c/div\u003e\n\n// Your post markdown\n```\n\nMake sure you have the \u003cdiv id=\"pscode-highlight-error\"\u003e 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 the \u003cdiv\u003e tag.\n\nWhat 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.\n\nYou 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!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpauby%2Fchroma-powershellconsole-css","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpauby%2Fchroma-powershellconsole-css","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpauby%2Fchroma-powershellconsole-css/lists"}