{"id":18546654,"url":"https://github.com/proctoru/ducktrails","last_synced_at":"2025-04-09T20:31:04.334Z","repository":{"id":56848083,"uuid":"91830392","full_name":"ProctorU/ducktrails","owner":"ProctorU","description":"Restful Breadcrumbs","archived":false,"fork":false,"pushed_at":"2018-02-23T20:26:10.000Z","size":80,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-03-26T14:54:21.694Z","etag":null,"topics":["proctoru"],"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/ProctorU.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-19T17:35:14.000Z","updated_at":"2018-03-19T20:31:42.000Z","dependencies_parsed_at":"2022-09-09T07:50:20.100Z","dependency_job_id":null,"html_url":"https://github.com/ProctorU/ducktrails","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProctorU%2Fducktrails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProctorU%2Fducktrails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProctorU%2Fducktrails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProctorU%2Fducktrails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ProctorU","download_url":"https://codeload.github.com/ProctorU/ducktrails/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248107231,"owners_count":21048883,"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":["proctoru"],"created_at":"2024-11-06T20:26:21.027Z","updated_at":"2025-04-09T20:31:03.947Z","avatar_url":"https://github.com/ProctorU.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🦆 Ducktrails\n\nAutomatically generates breadcrumbs based on routes.\n\n**Warning: This API is still alpha; we welcome PRs and ideas as issues.**\n\n[![Ducktails Theme](http://i.imgur.com/g0PXjHX.png)](https://www.youtube.com/watch?v=CMU2NwaaXEA \"Ducktails Theme\")\n\n## Usage\nFor basic applications using a restful architecture, ducktrails should generate the breadcrumbs automatically.\n\nFor example, if the uri is `/users/#{user-id}/posts/#{post-id}`\nPutting `\u003c%= breadcrumbs %\u003e` in the (erb) view.\n\nWould render:\n\n`Home / All Users / user-name / All Posts / post-name`\n\nSimply include `= breadcrumbs` in your view. `breadcrumbs` takes a block argument.  The block isn't required but if you want to set some objects for the uri resources (recommend) you can follow the guide below.\n\nResources are inferred and will be used to manipulate each URI segment. If a resource is not found, Ducktrails will fallback to the URI.\n\nPossible keys for a breadcrumb resource are: `resource, key, policy, collection_prefix`. The key and collection prefix can be configured in the `Ducktrails.rb` initializer described below.\n\n```erb\n\u003c%=breadcrumbs do\n    {\n      users: {\n        resource: @user,\n        key: :first_name,\n        collection_prefix: 'Some'\n      }\n    }\n  end\n%\u003e\n```\n\nWill output\n\nAction | Breadcrumb\n---|---\nindex |`Home / Some Users`\nshow |`Home / Some Users / Kevin`\nnew |`Home / Some Users / New`\nedit |`Home /Some Users / Kevin / edit`\n\n## Installation\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'ducktrails'\n```\n\nAnd then execute:\n```bash\n$ bundle\n```\n\nOr install it yourself as:\n```bash\n$ gem install ducktrails\n```\n\n## Configuration\nDucktrails provides a standard initializer file:\n**Note**: Currently `ducktrails` is the only template theme provided\n\n```ruby\nDucktrails.configure do |config|\n  config.root_path = '/'\n  config.home_name = 'Home'\n  config.collection_prefix = 'All'\n  config.default_key = :id\n  config.theme = 'ducktrails'\nend\n```\n\n## Contributing\n\nPlease refer to each project's style guidelines and guidelines for submitting patches and additions. In general, we follow the \"fork-and-pull\" Git workflow.\n\n1. Fork the repo on GitHub\n2. Clone the project to your own machine\n  1. `bundle`\n  2. Create the test db `bundle exec rake --rakefile test/dummy/Rakefile db:setup`\n  3. `bundle exec rake` to test.\n3. Ensure your test coverage is A+\n4. Commit changes to your own branch\n5. Push your work back up to your fork\n6. Submit a Pull request so that we can review your changes\n\nNOTE: **Be sure to merge the latest from \"upstream\" before making a pull request!**\n\n## License\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%2Fproctoru%2Fducktrails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproctoru%2Fducktrails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproctoru%2Fducktrails/lists"}