{"id":19668195,"url":"https://github.com/dymio/vitrage","last_synced_at":"2025-04-29T00:30:29.661Z","repository":{"id":26416324,"uuid":"29866505","full_name":"dymio/vitrage","owner":"dymio","description":"Web-Page content management system for Rails, based on separated content pieces","archived":false,"fork":false,"pushed_at":"2016-09-29T09:03:02.000Z","size":75,"stargazers_count":7,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-20T17:19:49.830Z","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/dymio.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":"2015-01-26T15:15:27.000Z","updated_at":"2022-09-17T01:50:14.000Z","dependencies_parsed_at":"2022-08-29T05:54:03.021Z","dependency_job_id":null,"html_url":"https://github.com/dymio/vitrage","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/dymio%2Fvitrage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dymio%2Fvitrage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dymio%2Fvitrage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dymio%2Fvitrage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dymio","download_url":"https://codeload.github.com/dymio/vitrage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251410152,"owners_count":21584973,"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-11T16:34:45.930Z","updated_at":"2025-04-29T00:30:29.362Z","avatar_url":"https://github.com/dymio.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Vitrage\n=======\n\nVitrage allows you to store and manage your Rails application content as separated pieces of different types: text, image, slider, several-columned text etc. Pieces are objects of different Rails models, that have their specific views for show and edit actions. Vitrage allows you to edit the content pieces inline.\n\n\u003cimg src=\"http://www.vitroart.ru/upload/information_system_35/4/2/2/item_422/information_items_1242584051.jpg\" alt=\"vitrage of glass\" height=\"600\" width=\"379\"\u003e\n\n[![Gem Version](https://badge.fury.io/rb/vitrage.svg)](http://badge.fury.io/rb/vitrage)\n[![vitrage API Documentation](https://www.omniref.com/ruby/gems/vitrage.png)](https://www.omniref.com/ruby/gems/vitrage)\n\nInstallation\n------------\n\nPut this line in your Gemfile:\n\n    gem 'vitrage'\n\nThen run `bundle install`.\n\nAfter installing the gem, you need to run the generator.\n\n    bin/rails generate vitrage:install\n\nThe generator adds these files:\n\n    app/models/vitrage_owners_pieces_slot.rb\n    db/migrate/[timestamp]_create_vitrage_owners_pieces_slots.rb\n\nand line to the `routes.rb` file:\n\n    Vitrage.routes(self)\n\nNow, migrate your database: `bin/rake db:migrate`\n\nRequire js in your js file (`application.js` by default):\n\n    //= require jquery\n    //= require jquery_ujs\n    //= require jquery.remotipart\n    //= require vitrage/vitrage\n\nVitrage needs jquery, jquery_ujs and jquery.remotipart for correct work.\nIf you have this scripts already required, just skip inserting they strings.\n\nRequire vitrage css in your css file (`application.css` by default):\n\n    *= require vitrage/vitrage\n\n\nUse vitrage content pieces for your model and views\n---------------------------------------------------\n\nAdd to any models you want to use vitrage content pieces line:\n\n    acts_as_vitrage_owner\n\nAdd render call to the `show` view:\n\n    \u003c%= show_vitrage_for @object %\u003e\n\nAdd render call to the `edit` view:\n\n    \u003c%= edit_vitrage_for @object %\u003e\n\n\nAdd content piece\n-----------------\n\nContent pieces it is necessary parts of Vitrage. By default we have no pieces.\nDescribes process of creating simple content piece only with text field.\n\n    bin/rails generate vitrage:piece Text body:text\n\nThe generator adds these files:\n\n    db/migrate/[timestamp]_create_vtrg_texts.rb\n    app/models/vitrage_pieces/vtrg_text.rb\n    app/views/vitrage/_vtrg_text.html.erb\n    app/views/vitrage/_vtrg_text_form.html.erb\n    # ... and more\n\nMigrate your database: `bin/rake db:migrate`\n\nAdd name of content piece model to `PIECE_CLASSES_STRINGS` array constant\nof VitrageOwnersPiecesSlot model.\n\nAdd styles for add new block button:\n\n    .vtrg-new-block-kinds .vtrg-text { background: red; }\n\nDo not forget about piece view partials.\n\n\nCustom Pieces Controller\n------------------------\n\n`PiecesController` have actions for vitrage pieces.\nIf you need to override controller, create new controller, inherited from `Vitrage::PiecesController`:\n\n    class VitragePiecesController \u003c Vitrage::PiecesController\n      # add devise authorization as option\n      before_action :authenticate_admin_user!\n    end\n\nAnd add parameter `controller` to routes method call with underscored and pluralized controller name:\n\n    Vitrage.routes(self, controller: 'vitrage_pieces')\n\n\n\nLicense\n-------\nVitrage is released under the [MIT License](MIT-LICENSE).\n\n\nContributing\n------------\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n\nFeel free to use code of the project as you want, [create issues](https://github.com/dymio/vitrage/issues) or make pull requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdymio%2Fvitrage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdymio%2Fvitrage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdymio%2Fvitrage/lists"}