{"id":13721594,"url":"https://github.com/yivo/pug-rails","last_synced_at":"2025-10-25T21:31:43.184Z","repository":{"id":56889553,"uuid":"60367198","full_name":"yivo/pug-rails","owner":"yivo","description":"👌 Make Jade and Pug play well with Sprockets.","archived":false,"fork":false,"pushed_at":"2017-11-11T23:23:48.000Z","size":84,"stargazers_count":32,"open_issues_count":1,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-31T10:36:12.129Z","etag":null,"topics":["jade","jade-template-engine","pug","pug-template-engine","rails-asset-pipeline","ruby","ruby-gem","ruby-on-rails","sprockets"],"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/yivo.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}},"created_at":"2016-06-03T17:54:31.000Z","updated_at":"2024-03-18T03:08:03.000Z","dependencies_parsed_at":"2022-08-20T14:30:08.257Z","dependency_job_id":null,"html_url":"https://github.com/yivo/pug-rails","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yivo%2Fpug-rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yivo%2Fpug-rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yivo%2Fpug-rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yivo%2Fpug-rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yivo","download_url":"https://codeload.github.com/yivo/pug-rails/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238212407,"owners_count":19434955,"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":["jade","jade-template-engine","pug","pug-template-engine","rails-asset-pipeline","ruby","ruby-gem","ruby-on-rails","sprockets"],"created_at":"2024-08-03T01:01:19.010Z","updated_at":"2025-10-25T21:31:37.903Z","avatar_url":"https://github.com/yivo.png","language":"Ruby","funding_links":[],"categories":["Tools"],"sub_categories":["Frameworks"],"readme":"## 👌 Make Jade and Pug play well with Sprockets\n\n[![Gem Version](https://badge.fury.io/rb/pug-rails.svg)](https://badge.fury.io/rb/pug-rails)\n[![Build Status](https://travis-ci.org/yivo/pug-rails.svg?branch=master)](https://travis-ci.org/yivo/pug-rails)\n\n## About\n\n`pug-rails` is a gem that allows you to easily integrate Jade / Pug template engine with Rails asset packaging system known as Sprockets.\n\n[pug-ruby](https://github.com/yivo/pug-ruby) is used under the hood. Please refer to the gem if you would like to use Jade / Pug compiler API directly.\n\n## Installing gem\n\n**RubyGems users**\n\n1. Run `gem install pug-rails --version \"~\u003e 3.0.0\"`. \n2. Add `require \"pug-rails\"` to your code.\n\n**Bundler users**\n\n1. Add to your Gemfile:\n```ruby\ngem \"pug-rails\", \"~\u003e 3.0.0\"\n```\n2. Run `bundle install`.\n\n## Installing Jade and Pug\n\nSee installation steps and notes at [pug-ruby](https://github.com/yivo/pug-ruby#installing-jade). You may not need to do this step.\n\n## Requiring Jade runtime\n\nPut the next line in your asset manifest:\n```js\n//= require jade-runtime-1.11.0\n```\n\nYou may change Jade runtime.js version depending on your scenario.\n\n## Naming Jade templates\n\nUse `.jst.jade` as extension of your Jade files.\n\n## Requiring Pug runtime\n\nPut the next line in your asset manifest:\n```js\n//= require pug-runtime-2.0.2\n```\n\nYou may change Pug runtime.js version depending on your scenario.\n\n**IMPORTANT:** You don't need to do this if you have configured Pug compiler to inline runtime functions in template. Please read about `inlineRuntimeFunctions` option at official website: [pugjs.org](http://pugjs.org).\n\n## Naming Pug templates\n\nUse `.jst.pug` as extension of your Pug files.\n\n## Configuring Jade / Pug\n\nConfiguration documentation is available at [pug-ruby](https://github.com/yivo/pug-ruby#configuring-jade--pug).\n\n## Configuring asset lookup paths\n\nIt doesn't matter where to put Jade / Pug files but don't forget to update asset lookup paths. \nPersonally I prefer to put templates in `app/assets/templates`:\n```ruby\n# This will add app/assets/templates to asset lookup paths.\n#\n# Add the next line to your initializers or application.rb:\nRails.application.config.assets.paths \u003c\u003c Rails.root.join(\"app/assets/templates\")\n```\n\n## Running tests\n\n1. Install both Jade and Pug: `npm install --global jade pug`.\n2. Install gem dependencies: `bundle install`.\n3. Finally, run tests: `bundle exec appraisal rake test`.\n\n## Versioning\n\nPrior to 2.0 the version of the gem was the same as the version of the Jade runtime that it contained.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyivo%2Fpug-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyivo%2Fpug-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyivo%2Fpug-rails/lists"}