{"id":13667475,"url":"https://github.com/SpectralDragon/CodeSyntaxCSSGeneratorPlugin","last_synced_at":"2025-04-26T15:33:00.065Z","repository":{"id":143703435,"uuid":"255204734","full_name":"SpectralDragon/CodeSyntaxCSSGeneratorPlugin","owner":"SpectralDragon","description":"A Publish plugin that generates a syntax code css styles for you Splash Plugin from Xcode Color Theme.","archived":false,"fork":false,"pushed_at":"2023-04-08T22:42:46.000Z","size":7,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-07T12:02:38.575Z","etag":null,"topics":["css","dark-theme","publish","publish-plugin","splash","swift","syntax-highlighting","xcode"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SpectralDragon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-04-13T01:35:12.000Z","updated_at":"2023-04-08T22:41:42.000Z","dependencies_parsed_at":"2023-04-14T02:03:15.648Z","dependency_job_id":null,"html_url":"https://github.com/SpectralDragon/CodeSyntaxCSSGeneratorPlugin","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpectralDragon%2FCodeSyntaxCSSGeneratorPlugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpectralDragon%2FCodeSyntaxCSSGeneratorPlugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpectralDragon%2FCodeSyntaxCSSGeneratorPlugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpectralDragon%2FCodeSyntaxCSSGeneratorPlugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpectralDragon","download_url":"https://codeload.github.com/SpectralDragon/CodeSyntaxCSSGeneratorPlugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251008923,"owners_count":21522198,"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":["css","dark-theme","publish","publish-plugin","splash","swift","syntax-highlighting","xcode"],"created_at":"2024-08-02T07:00:37.764Z","updated_at":"2025-04-26T15:32:55.048Z","avatar_url":"https://github.com/SpectralDragon.png","language":"Swift","funding_links":[],"categories":["Plugins"],"sub_categories":[],"readme":"# CodeSyntaxCSSGeneratorPlugin\n\nA [Publish](https://github.com/johnsundell/publish) plugin that generates a syntax code css styles for you [Splash Plugin](https://github.com/johnsundell/splashpublishplugin) from Xcode Color Theme.\n\n[![Swift 5.1](https://img.shields.io/badge/Swift-5.1-orange.svg?style=flat)](https://swift.org/)\n[![Publish](https://img.shields.io/badge/Publish-blue.svg?style=flat)](https://github.com/johnsundell/publish)\n\n## Install\n\nTo install it into your [Publish](https://github.com/johnsundell/publish) package, add it as a dependency within your `Package.swift` manifest:\n```swift\nlet package = Package(\n    ...\n    dependencies: [\n        ...\n        .package(url: \"https://github.com/SpectralDragon/CodeSyntaxCSSGenerator.git\", from: \"0.1.0\")\n    ],\n    targets: [\n        .target(\n            ...\n            dependencies: [\n                ...\n                \"CodeSyntaxCSSGeneratorPlugin\"\n            ]\n        )\n    ]\n    ...\n)\n```\n\n## Usage\n\nMove `dvtcolortheme` or `xccolortheme` file to Resource dirictory and intall the plugin in any place in build step.\n\n```swift\n\n// My xcode theme `Light.dvtcolortheme`\n\nimport CodeSyntaxCSSGeneratorPlugin\n\nSite().publish(using: [\n    .installPlugin(\n        .generateCodeCSS(withClassPrefix: \"pre code .s-\",\n                         theme: .xcode(\"Light.dvtcolortheme\"))\n    ),\n])\n```\n\nafter that, the plugin will generate `codesyntax.css` file\n\n```css \npre code .s-preprocessing {\n    color: #63381FFF\n}\n\npre code .s-comment {\n    color: #007400FF\n}\n\npre code .s-number {\n    color: #1C00CEFF\n}\n\npre code .s-call {\n    color: #25464AFF\n}\n\npre code .s-property {\n    color: #3E6D74FF\n}\n\npre code .s-keyword {\n    color: #A90D91FF\n}\n\npre code .s-dotAccess {\n    color: #25464AFF\n}\n\npre code .s-type {\n    color: #3E6D74FF\n}\n\npre code .s-string {\n    color: #C41A15FF\n}\n```\n\nAlso plugin can generate css to dark scheme, just use `CodeTheme.dynamic(light: CodeTheme, dark: CodeTheme)` case. The plugin add `@media(prefers-color-scheme: dark)` with passed code theme.\n\n\n# Features\n\n- [ ] intellij theme\n- [ ] VSCode\n\nThank you and enjoy 💯\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSpectralDragon%2FCodeSyntaxCSSGeneratorPlugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSpectralDragon%2FCodeSyntaxCSSGeneratorPlugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSpectralDragon%2FCodeSyntaxCSSGeneratorPlugin/lists"}