{"id":21162647,"url":"https://github.com/ytbryan/highlighting","last_synced_at":"2025-03-14T16:15:03.269Z","repository":{"id":56876406,"uuid":"52922582","full_name":"ytbryan/highlighting","owner":"ytbryan","description":":v: Super Simple Syntax highlighting for Rails 3.1+ using latest PrismJS easily","archived":false,"fork":false,"pushed_at":"2016-05-01T18:14:47.000Z","size":1405,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-22T01:45:23.895Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/ytbryan.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-02T01:10:00.000Z","updated_at":"2021-04-26T21:19:05.000Z","dependencies_parsed_at":"2022-08-20T22:00:47.146Z","dependency_job_id":null,"html_url":"https://github.com/ytbryan/highlighting","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytbryan%2Fhighlighting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytbryan%2Fhighlighting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytbryan%2Fhighlighting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytbryan%2Fhighlighting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ytbryan","download_url":"https://codeload.github.com/ytbryan/highlighting/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243606960,"owners_count":20318314,"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":[],"created_at":"2024-11-20T13:31:54.948Z","updated_at":"2025-03-14T16:15:03.246Z","avatar_url":"https://github.com/ytbryan.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Highlighting\n\nHighlighting ships with the latest [PrismJS](http://prismjs.com).\n\n\u003e Prism is a lightweight, robust, elegant syntax highlighting library. It's a spin-off project from Dabblet.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'highlighting'\n```\n\nAnd then execute:\n\n```\n$ bundle\n```\n\nOr install it yourself as:\n\n```\n$ gem install highlighting\n```\n\nAt application.js, replace [language] with the name of language. For example: prism-ruby or prism-coffeescript\n```\n//= require jquery\n//= require jquery_ujs\n//= require turbolinks\n//= require prism\n//= require prism-[language]\n//= require prism-turbolinks #optional\n//= require_tree .\n```\n\nAt application.css, add `*= require prism-[theme]` or use the default `*= require prism`\n\n```\n *= require_tree .\n *= require prism-[theme]\n *= require_self\n```\nThere are various other themes to choose from. For example `*= require prism-tomorrow`, `*= require prism-twilight`.\n\n\n## Usage\nUse the alias in place of xxxx in `language-xxxx`. `language-xxxx` is a css rule here used by prismjs.\n\nFor example: ruby, python, go, swift\n\n```\n\u003c%= code \"language-ruby\" %\u003e\n  \u003c!-- type any ruby code you like --\u003e\n\u003c% end %\u003e\n```\n\n## Known Issues\n\nWith turbolinks enabled, prismjs is not called at page load. For quick fix, add the `//= require prism-turbolinks` line at application.js\n\n```\n//= require jquery\n//= require jquery_ujs\n//= require turbolinks\n//= require prism\n//= require prism-ruby\n//= require prism-turbolinks\n//= require_tree .\n```\n\nIf you wish to add the code manually, read [prismjs not working with turbolinks](http://stackoverflow.com/questions/21278357/prism-js-not-working-with-rails-4-turbolinks/21355342#21355342)\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake false` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/ytbryan/highlighting. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.\n\n## License\n\nHighlighting is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fytbryan%2Fhighlighting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fytbryan%2Fhighlighting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fytbryan%2Fhighlighting/lists"}