{"action":"closed","issue":{"url":"https://api.github.com/repos/bolt/bolt/issues/3241","labels_url":"https://api.github.com/repos/bolt/bolt/issues/3241/labels{/name}","comments_url":"https://api.github.com/repos/bolt/bolt/issues/3241/comments","events_url":"https://api.github.com/repos/bolt/bolt/issues/3241/events","html_url":"https://github.com/bolt/bolt/issues/3241","id":63831850,"number":3241,"title":"[RFC] Method of specifying an original DB population","user":{"login":"Pinpickle","id":3238878,"avatar_url":"https://avatars.githubusercontent.com/u/3238878?v=3","gravatar_id":"","url":"https://api.github.com/users/Pinpickle","html_url":"https://github.com/Pinpickle","followers_url":"https://api.github.com/users/Pinpickle/followers","following_url":"https://api.github.com/users/Pinpickle/following{/other_user}","gists_url":"https://api.github.com/users/Pinpickle/gists{/gist_id}","starred_url":"https://api.github.com/users/Pinpickle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pinpickle/subscriptions","organizations_url":"https://api.github.com/users/Pinpickle/orgs","repos_url":"https://api.github.com/users/Pinpickle/repos","events_url":"https://api.github.com/users/Pinpickle/events{/privacy}","received_events_url":"https://api.github.com/users/Pinpickle/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-03-23T21:03:29Z","updated_at":"2015-03-25T22:01:47Z","closed_at":"2015-03-25T22:01:47Z","body":"Git is my friend, I can keep my website code backed up online very easily. \r\n\r\nI like making everything editable - that is why there is such thing as a CMS.\r\n\r\nThere can be a complex relationship with some of the pre-programmed parts of the site (templating and routing) and the dynamic and editable parts (records, I'm talking slugs here). This can result in a fair amount of setup if we ever had to redeploy the website, or someone else wanted to build a testing environment. It's also quite error prone. To be clear, the main issue here is parts of the code depending on the slug/path of a record to function properly. The correct pages must have the correct slug. Also for the sake of version control, I would like there to be a 'correct' representation of the website in version control.\r\n\r\nI'm proposing a method of prefilling the database with specified entries on initial install. Potentially with a `prefill.yml` file. \r\n\r\n```yaml\r\npages:\r\n  - title: Home\r\n    slug: home\r\n    content: Blah blah blah\r\n  - title: Contact Us\r\n    slug: contact\r\n    content: Blah blah blah\r\n\r\nentries:\r\n  - title: A Very Important Blog Post\r\n    slug: most-important\r\n    content: This must be on every site install\r\n```\r\n\r\nI would mainly do this for the slugs, but this could also enable us to put the barebones content for our site into version control. Some of that HTML content could get a bit long, so maybe there could be a `prefill` folder in the app config, which will contain HTML files (or anything else), and you could include them\r\n\r\n```yaml\r\npages:\r\n  - title: Home\r\n    slug: home\r\n    content: home.html\r\n```\r\n\r\nBetter yet, this could also be a part of the integrity checker. So if you push changes to a live site, and one of these records *doesn't* exist, it would create it."}}