{"id":15513750,"url":"https://github.com/sebouchu/propshaft-sample-app","last_synced_at":"2025-03-28T21:42:39.678Z","repository":{"id":84592280,"uuid":"436779961","full_name":"SebouChu/propshaft-sample-app","owner":"SebouChu","description":"Sample Rails 7 application with Propshaft","archived":false,"fork":false,"pushed_at":"2021-12-10T08:44:53.000Z","size":42,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-03T08:01:49.135Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/SebouChu.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":"2021-12-09T22:30:17.000Z","updated_at":"2025-01-07T04:43:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"d035ee19-03d3-4b12-94c5-4d3d4f05bb27","html_url":"https://github.com/SebouChu/propshaft-sample-app","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"fbeb918d049fd28b4ca69def858af6d6733d9a30"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebouChu%2Fpropshaft-sample-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebouChu%2Fpropshaft-sample-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebouChu%2Fpropshaft-sample-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebouChu%2Fpropshaft-sample-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SebouChu","download_url":"https://codeload.github.com/SebouChu/propshaft-sample-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246106669,"owners_count":20724400,"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-10-02T09:54:59.310Z","updated_at":"2025-03-28T21:42:39.658Z","avatar_url":"https://github.com/SebouChu.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Propshaft Sample App\n\nA Rails 7 application to try a few things with Propshaft. This README will contain some issues I encountered.\n\n## Specs\n\n- Rails 7.0.0.rc1\n- Ruby 3.0.3\n- Propshaft\n- JSBundling-Rails (with esbuild)\n- CSSBundling-Rails (with sass)\n- Bootstrap 5\n- Bootstrap Icons\n- Font Awesome 5 Icons\n\n## Issues\n\n### Bootstrap Icons - Font files\n\nBootstrap 5 Icons did not work out-of-the-box. Fonts were not imported correctly.\n\nIn the original `bootstrap-icons.scss`, they are imported via the `$bootstrap-icons-font-src` variable.\n\nDefault value:\n```scss\n$bootstrap-icons-font-src: url(\"./fonts/bootstrap-icons.woff2?30af91bf14e37666a085fb8a161ff36d\") format(\"woff2\"),\nurl(\"./fonts/bootstrap-icons.woff?30af91bf14e37666a085fb8a161ff36d\") format(\"woff\") !default;\n```\n\nTo make the icons work, I had to do two things:\n\n- Create an initializer to add the fonts from `node_modules` in Propshaft's load path.\n\n  In `config/initializers/assets.rb`:\n  ```ruby\n  Rails.application.config.assets.paths \u003c\u003c Rails.root.join(\"node_modules\", \"bootstrap-icons\", \"font\")\n  ```\n- Change the `$bootstrap-icons-font-src` variable before importing `bootstrap-icons` stylesheet. We need to remove the fingerprint.\n\n  In `app/assets/stylesheets/application.sass.scss`:\n  ```scss\n  $bootstrap-icons-font-src: url(\"./fonts/bootstrap-icons.woff2\") format(\"woff2\"),\n  url(\"./fonts/bootstrap-icons.woff\") format(\"woff\");\n  @import \"bootstrap-icons/font/bootstrap-icons\";\n  ```\n\n### Font Awesome - Font files\n\nFont Awesome Icons did not work out-of-the-box. Fonts were not imported correctly.\n\nIt uses an SCSS variable `$fa-font-path` to determine where to look for font files. (default: `\"../webfonts\"`)\n\nTo make the icons work, I had to:\n\n- Add Font Awesome folder from `node_modules` in Propshaft's load path.\n\n  In `config/initializers/assets.rb`:\n  ```ruby\n  Rails.application.config.assets.paths \u003c\u003c Rails.root.join(\"node_modules\", \"@fortawesome\", \"fontawesome-free\")\n  ```\n- Change the `$fa-font-path` variable before importing `@fortawesome/fontawesome` stylesheets.\n\n  In `app/assets/stylesheets/application.sass.scss`:\n  ```scss\n  // Before: $fa-font-path: \"../webfonts\";\n  $fa-font-path: \"./webfonts\";\n  @import \"@fortawesome/fontawesome-free/scss/fontawesome\";\n  @import \"@fortawesome/fontawesome-free/scss/solid\";\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebouchu%2Fpropshaft-sample-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebouchu%2Fpropshaft-sample-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebouchu%2Fpropshaft-sample-app/lists"}