{"id":22229585,"url":"https://github.com/altudev/brism","last_synced_at":"2025-07-26T20:32:44.149Z","repository":{"id":260338480,"uuid":"880970769","full_name":"altudev/Brism","owner":"altudev","description":"PrismJS implementation for Blazor","archived":false,"fork":false,"pushed_at":"2025-01-29T12:51:06.000Z","size":1674,"stargazers_count":39,"open_issues_count":4,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-10T10:51:13.681Z","etag":null,"topics":["blazor","blazor-application","blazor-client","blazor-components","blazor-server","blazor-webassembly","csharp","dotnet"],"latest_commit_sha":null,"homepage":"","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/altudev.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,"zenodo":null}},"created_at":"2024-10-30T17:28:56.000Z","updated_at":"2025-06-06T10:47:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"69e1fcdf-1256-42d4-ae1b-26561b762b60","html_url":"https://github.com/altudev/Brism","commit_stats":null,"previous_names":["altudev/brism"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/altudev/Brism","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altudev%2FBrism","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altudev%2FBrism/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altudev%2FBrism/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altudev%2FBrism/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/altudev","download_url":"https://codeload.github.com/altudev/Brism/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altudev%2FBrism/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267227771,"owners_count":24056358,"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","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["blazor","blazor-application","blazor-client","blazor-components","blazor-server","blazor-webassembly","csharp","dotnet"],"created_at":"2024-12-03T01:11:00.102Z","updated_at":"2025-07-26T20:32:44.143Z","avatar_url":"https://github.com/altudev.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Brism - Syntax Highlighting Made Easy for Blazor\n\n[![NuGet](https://img.shields.io/nuget/v/Brism.svg)](https://www.nuget.org/packages/Brism)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n![Screenshot of component in action 1](./.screenshots/screenshot1.png)\n![Screenshot of component in action 2](./.screenshots/screenshot2.png)\n\nBrism brings the power of PrismJS to Blazor, making your code examples look fantastic with minimal effort. Perfect for documentation, blogs, or any application that needs beautiful code snippets.\n\n## Features\n\n- Syntax highlighting that actually looks good\n- Line numbers (that you can toggle on/off)\n- Cool command-line styling for terminal examples\n- Works seamlessly with Blazor Server and WebAssembly\n- Pick from various themes to match your site\n- Super easy to set up (seriously, it takes like 2 minutes)\n- Type-safe language selection (no more typos!)\n\n## Getting Started\n\n### 1. Install the NuGet Package\n\n```bash\ndotnet add package Brism\n```\n\n### 2. Add Required Files\n\nIn your `App.razor` file (or `_Host.cshtml` for Server-side Blazor), add these lines in the `\u003chead\u003e` section:\n\n```html\n\u003c!-- Base PrismJS styles (required) --\u003e\n\u003clink href=\"_content/Brism/prism.css\" rel=\"stylesheet\" /\u003e\n\n\u003c!-- Choose ONE theme from below (we're using synthwave84 as an example) --\u003e\n\u003clink href=\"_content/Brism/prism-synthwave84.css\" rel=\"stylesheet\" /\u003e\n```\n\nAnd these scripts at the end of the `\u003cbody\u003e`:\n\n```html\n\u003cscript src=\"_content/Brism/prism.js\"\u003e\u003c/script\u003e\n\n\u003cscript type=\"module\" src=\"_content/Brism/prismInterop.js\"\u003e\u003c/script\u003e\n```\n\n### 3. Wire It Up\n\nAdd this to your `Program.cs`:\n\n```csharp\nbuilder.Services.AddBrism();\n```\n\n### 4. Import It\n\nAdd this to your `_Imports.razor`:\n\n```csharp\n@using Brism\n```\n\n### 5. Use It!\n\nDrop this into any of your Blazor pages:\n\n```razor\n\u003cCodeBlock\n    Code=\"@myCode\"\n    Language=\"CodeLanguage.CSharp\"\n    EnableLineNumbers=\"true\" /\u003e\n```\n\n## Available Themes\n\n### Dark Themes\n\n- **Modern \u0026 Sleek**\n  - `prism-one-dark.css` - Atom's One Dark\n  - `prism-material-dark.css` - Material Design inspired\n  - `prism-vsc-dark-plus.css` - VS Code dark theme\n  - `prism-dracula.css` - Famous Dracula theme\n  - `prism-synthwave84.css` - Retro synthwave vibes\n\n- **Rich \u0026 Deep**\n  - `prism-night-owl.css` - Perfect for night coding\n  - `prism-nord.css` - Cool Nordic theme\n  - `prism-material-oceanic.css` - Deep blue oceanic\n  - `prism-darcula.css` - IntelliJ-inspired\n  - `prism-shades-of-purple.css` - Vibrant purple theme\n\n- **Nature-Inspired**\n  - `prism-duotone-dark.css` - Subtle two-tone dark\n  - `prism-duotone-forest.css` - Forest-inspired colors\n  - `prism-duotone-earth.css` - Earthy tones\n  - `prism-duotone-sea.css` - Ocean-inspired theme\n  - `prism-duotone-space.css` - Space-like dark theme\n\n### Light Themes\n\n- **Clean \u0026 Professional**\n  - `prism-one-light.css` - Atom's One Light theme\n  - `prism-material-light.css` - Material Design light\n  - `prism-vs.css` - Visual Studio inspired\n\n- **Soft \u0026 Gentle**\n  - `prism-duotone-light.css` - Gentle two-tone light\n  - `prism-gruvbox-light.css` - Soft retro colors\n  - `prism-coldark-cold.css` - Cool light tones\n\n### Special Themes\n\n- **Unique Styles**\n  - `prism-lucario.css` - Pokémon-inspired\n  - `prism-hopscotch.css` - Playful and colorful\n  - `prism-holi-theme.css` - Festive and bright\n  - `prism-laserwave.css` - Retro laser theme\n  - `prism-z-touch.css` - Modern touch\n\n### High Contrast\n\n- `prism-a11y-dark.css` - Accessibility-focused dark theme\n- `prism-cb.css` - Color-blind friendly\n- `prism-ghcolors.css` - GitHub-like colors\n\n## Making It Your Own\n\nHere's what you can tweak:\n\n| Property | What it does | Default |\n|----------|-------------|---------|\n| Code | Your code snippet (required) | - |\n| Language | The language for highlighting (required) | - |\n| EnableLineNumbers | Show/hide line numbers | true |\n| EnableCommandLine | Add a command prompt look | false |\n| CommandLineUser | Custom prompt user | \"User\" |\n| CommandLineHost | Custom prompt host | \"Host\" |\n| Css | Extra CSS if you need it | \"\" |\n\n## Languages? We've Got Them All!\n\nNo more guessing language names or dealing with typos! We provide a handy `CodeLanguage` enum with constants for all supported languages. Here are some popular ones:\n\n```csharp\n// Common languages\nCodeLanguage.CSharp      // for C#\nCodeLanguage.JavaScript  // for JavaScript\nCodeLanguage.TypeScript  // for TypeScript\nCodeLanguage.Python      // for Python\nCodeLanguage.Html        // for HTML\nCodeLanguage.Css         // for CSS\nCodeLanguage.Json        // for JSON\nCodeLanguage.Sql         // for SQL\nCodeLanguage.Docker      // for Dockerfiles\nCodeLanguage.Yaml        // for YAML/YML\nCodeLanguage.Markdown    // for Markdown\nCodeLanguage.Bash        // for Shell scripts\n```\n\nAnd that's just the tip of the iceberg! We support 180+ languages, including:\n\n- All major web technologies\n- Popular programming languages\n- Markup and styling languages\n- Configuration formats\n- Domain-specific languages\n- And tons more!\n\nJust use the `CodeLanguage` enum to ensure you're always using the correct language identifier.\n\n## Cool Things You Can Do\n\n### Command Line Style\n\nPerfect for showing terminal commands:\n\n```razor\n\u003cCodeBlock\n    Code=\"npm install something-cool\"\n    Language=\"CodeLanguage.Bash\"\n    EnableCommandLine=\"true\"\n    CommandLineUser=\"dev\"\n    CommandLineHost=\"laptop\" /\u003e\n```\n\n### Clean Code View\n\nWhen you just want the code without the extras:\n\n```razor\n\u003cCodeBlock\n    Code=\"@myCleanCode\"\n    Language=\"CodeLanguage.CSharp\"\n    EnableLineNumbers=\"false\" /\u003e\n```\n\n### Multiple Languages in One Page\n\nMix and match different languages:\n\n```razor\n\u003cCodeBlock Code=\"@cssCode\" Language=\"CodeLanguage.Css\" /\u003e\n\u003cCodeBlock Code=\"@htmlCode\" Language=\"CodeLanguage.Html\" /\u003e\n\u003cCodeBlock Code=\"@jsCode\" Language=\"CodeLanguage.JavaScript\" /\u003e\n```\n\n## Want to Help?\n\nWe'd love to have you on board! Here's how you can contribute:\n\n1. Fork it\n2. Create your feature branch (`git checkout -b feature/cool-new-thing`)\n3. Make your changes\n4. Push to the branch (`git push origin feature/cool-new-thing`)\n5. Open a Pull Request\n\nEven small improvements are welcome - found a typo? Fixed a bug? We appreciate all contributions!\n\n## The Legal Stuff\n\nThis project is under the MIT License - basically, you can do whatever you want with it, just keep the license notice. See the [LICENSE](LICENSE) file for the formal details.\n\n## Show Some Love \n\nIf Brism makes your life easier:\n\n- Give us a star on GitHub\n- Tell your fellow devs about it\n- Found a bug? Open an issue\n- Have an idea? Let's hear it!\n\n## Thank You!\n\nBig thanks to:\n\n- The amazing [PrismJS](https://prismjs.com/) team\n- Everyone who has contributed\n- You, for checking out our project!\n\n---\nBuilt with passion for the Blazor community ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faltudev%2Fbrism","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faltudev%2Fbrism","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faltudev%2Fbrism/lists"}