{"id":18338733,"url":"https://github.com/tableflip/brandnewweddings","last_synced_at":"2025-04-09T20:35:50.267Z","repository":{"id":72910310,"uuid":"55593979","full_name":"tableflip/brandnewweddings","owner":"tableflip","description":":wedding: :robot: Website for brandnewweddings.co.uk","archived":false,"fork":false,"pushed_at":"2020-09-04T22:47:52.000Z","size":8136,"stargazers_count":2,"open_issues_count":4,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-15T12:46:44.359Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.brandnewweddings.co.uk","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tableflip.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2016-04-06T09:41:14.000Z","updated_at":"2024-03-30T15:57:11.000Z","dependencies_parsed_at":"2023-05-26T01:15:27.214Z","dependency_job_id":null,"html_url":"https://github.com/tableflip/brandnewweddings","commit_stats":null,"previous_names":[],"tags_count":359,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tableflip%2Fbrandnewweddings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tableflip%2Fbrandnewweddings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tableflip%2Fbrandnewweddings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tableflip%2Fbrandnewweddings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tableflip","download_url":"https://codeload.github.com/tableflip/brandnewweddings/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248108364,"owners_count":21049121,"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-05T20:15:01.525Z","updated_at":"2025-04-09T20:35:50.230Z","avatar_url":"https://github.com/tableflip.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# br\u0026newweddings\n\nWebsite for http://brandnewweddings.co.uk\n\n## Getting started\n\nWith node and npm installed:\n\n```sh\nnpm install\nnpm start\n```\n\nThis project uses npm scripts to build the site to the `dist` directory.\n\n- `npm start` - Build site, watch for changes and run a hot code reloading server on http://localhost:3000\n\n## Helpers\n\nAny module dropped into the *helpers* folder will be passed in the locals to all templates, with the obvious camel-case conversion (i.e. `is-equal` would be available as `isEqual`).\n\n## Declaring schemas\n\nFields in a *content.json* or *facts.json* which do not have a declared `type` in the corresponding *schema.json* are assumed to be of type *text*.  The available types are:\n\n* collection\n* color\n* img\n* list\n* map\n* text\n* textarea\n\nIf validation beyond that which is built in for these fields is required, it can be supplied in a `validation` key in the *schema.json*:\n\n```json\n{\n  \"exampleField\": {\n    \"type\": \"text\",\n    \"validation\": {\n      \"format\": \"uri\"  \n    }\n  },  \n}\n```\n\nAvailable validation options are as per JSON-schema and can be found [here](http://json-schema.org/latest/json-schema-validation.html).\n\n### Regex validation\n\nJSON-schema regex patterns only allow a subset of those available in Javascript - for example, periods will match the period character rather than any character.  Full details can be found under the *pattern* section [here](http://json-schema.org/latest/json-schema-validation.html).\n\n## Defining collections\n\nA collection (array of objects) is declared in the appropriate *schema.json* as a **one-element array** containing the declaration object rather than the object itself.  Within this single object, declarations are as they would be for any other field.  For example:\n\n```json\n{\n  \"carousel\": [{\n    \"title\": {\n      \"type\": \"text\",\n      \"default\": \"New entry\"\n     },\n    \"image\": {\n      \"type\": \"img\",\n      \"default\": \"http://placehold.it/350x150\"\n    },\n    \"link\": {\n      \"type\": \"text\",\n      \"default\": \"http://example.com\",\n      \"validation\": {\n        \"pattern\": \"^(https?://)?([0-9a-z.-]+).([a-z.]{2,6})([/[0-9][a-z].-]*)*/?$\"  \n      }\n    }\n  }]\n}\n```\n\n**Note that in a collection every field requires a `default` to be set for the client to be able to add new items.**\n\n## Collections which define sub-pages\n\nCollections can be used to define subpages, so that the build process will provide a separate page in the same folder as the parent page for each item in a collection.  To achieve this, you need to add the following key to the *package.json*:\n\n```json\n\"subPages\": {\n  \"my-page\": {\n    \"field\": \"subPages\",\n    \"slugFrom\": \"title\",\n    \"template\": \"subpage\"\n  }\n}\n```\n\nEach key in *subPages* should correspond to the page which contains the collection in question and under which the sub-pages will live.\n\n* **field** (required) - the page field which will be used to generate the sub-pages. Must be a collection.\n* **slugFrom** (required) - the key within each collection entry from which to generate the page slug (e.g. `title` or `name`).\n* **template** (optional) - the name of the alternative template to use to render subpages.  If not supplied, the parent page's *index.jade* will be used.  *Do not append `.jade` to the template name here*.\n\nThe parent page template will receive the same content it would have otherwise, but each entry in the given collection will have `_slug` and `_index` values attached to it for easy routing.\n\nFor the child page template (either *index.jade* or the supplied alternative), the contents local is exactly as per the parent, but with an additional `_entry` field containing the contents of the specific entry (including `_slug` and `_index`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftableflip%2Fbrandnewweddings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftableflip%2Fbrandnewweddings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftableflip%2Fbrandnewweddings/lists"}