{"id":17330638,"url":"https://github.com/adam12/inert","last_synced_at":"2025-04-14T17:54:13.940Z","repository":{"id":56877582,"uuid":"109885089","full_name":"adam12/inert","owner":"adam12","description":"An experimental static site builder with unambitious goals.","archived":false,"fork":false,"pushed_at":"2024-12-27T16:17:11.000Z","size":73,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T05:43:26.123Z","etag":null,"topics":["roda","ruby","static-site","static-site-generator"],"latest_commit_sha":null,"homepage":null,"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/adam12.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2017-11-07T20:06:44.000Z","updated_at":"2024-12-27T16:17:15.000Z","dependencies_parsed_at":"2024-10-15T14:51:55.646Z","dependency_job_id":"759f09ba-582d-4db3-960d-fb6fe1af3dc1","html_url":"https://github.com/adam12/inert","commit_stats":{"total_commits":84,"total_committers":2,"mean_commits":42.0,"dds":"0.011904761904761862","last_synced_commit":"4b2a157b3c24afccb3c479961a27c748466380d0"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam12%2Finert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam12%2Finert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam12%2Finert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam12%2Finert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adam12","download_url":"https://codeload.github.com/adam12/inert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248931864,"owners_count":21185257,"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":["roda","ruby","static-site","static-site-generator"],"created_at":"2024-10-15T14:51:54.015Z","updated_at":"2025-04-14T17:54:13.909Z","avatar_url":"https://github.com/adam12.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Inert\n\nAn experimental static site builder with unambitious goals.\n\n## Project Goals\n\n- Be fast\n- Allow reading of YAML frontmatter\n- Allow queueing of manual URLs for preservation\n\n\n## Usage\n\nInstall the gem:\n\n    gem install inert\n\nCreate a few folders:\n\n    mkdir static views\n\nAnd a layout file:\n\n    echo \"\u003c%= yield %\u003e\" \u003e views/layout.erb\n\nAnd then start the Inert server:\n\n    inert\n\nWhen you're ready to deploy, build the site:\n\n    inert build\n\n## Configuring\n\nBy default, Inert expects a few things, and should work without configuration.\nBecause it's built on top of Roda, it's very easily extendable, and Inert\nprovides hooks to do this via the `Inertfile` it will read from your project\nroot at runtime.\n\n```ruby\n# Inertfile\nInert.config do |inert|\n   inert.helpers do\n     def generator\n       \"Inert v#{Inert::VERSION}\"\n     end\n   end\n\n  inert.app do\n    plugin :h\n  end\n\n  inert.routes do |r|\n    r.on \"employees.html\" do\n      @employees = [] # Read in actual data here\n      view(\"employees.html.erb\")\n    end\n  end\nend\n```\n\n## Asset Fingerprinting\n\nUse asset fingerprinting to enable max-cache times on all your static assets.\n\n```ruby\n# Inertfile\nInert.config do |inert|\n  inert.app do\n    plugin :timestamp_public\n  end\n\n  inert.routes do |r|\n    r.timestamp_public\n  end\nend\n```\n\nAnd inside your views, use the `timestamp_path` helper with the name of the file\nin `static/` wherever you'd just use the filename itself:\n\n```ruby\n\u003cimg src=\"\u003c%= timestamp_path \"some_image_in_static_folder.png\" %\u003e\"\u003e\n```\n\n## Asset Minification\n\nUse asset minification to compile and compress all your CSS and JS assets into\na single file.\n\n```ruby\n# Inertfile\n\nInert.config do |inert|\n  inert.app do\n    plugin :assets, css: %w\"text.css layout.css\"\n    compile_assets if Inert.building?\n  end\n\n  inert.routes do |r|\n    r.assets\n  end\nend\n```\n\nAnd inside your layout, use the `assets` helper with the name of the asset group:\n\n```ruby\n\u003c%= assets(:css) %\u003e\n```\n\nMake sure you put your assets in `assets/group`. For the example above, you'd have\n`assets/css/text.css` and `assets/css/layout.css`.\n\n\n## Live Reloads\n\nUse the `roda-live_reload` gem to enable live reloads:\n\n\n```ruby\n# Gemfile\ngem \"roda-live_reload\"\ngem \"puma\" # Webrick wont' currently work with roda-live_reload\n\n\n# Inertfile\nInert.config do |inert|\n  inert.app do\n    plugin :live_reload if Inert.development?\n  end\n\n  inert.routes do |r|\n    r.live_reload if Inert.development?\n  end\nend\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/adam12/inert.\n\nI love pull requests! If you fork this project and modify it, please ping me to see\nif your changes can be incorporated back into this project.\n\nThat said, if your feature idea is nontrivial, you should probably open an issue to\n[discuss it](http://www.igvita.com/2011/12/19/dont-push-your-pull-requests/)\nbefore attempting a pull request.\n\n## License\n\nThe gem 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%2Fadam12%2Finert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadam12%2Finert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadam12%2Finert/lists"}