{"id":17295741,"url":"https://github.com/bnb/metalsmith-barebones","last_synced_at":"2025-04-14T12:03:23.734Z","repository":{"id":74933477,"uuid":"49684359","full_name":"bnb/metalsmith-barebones","owner":"bnb","description":"A barebones boilerplate implementation of Metalsmith for building websites.","archived":false,"fork":false,"pushed_at":"2016-01-28T18:16:14.000Z","size":7,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T12:03:02.905Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bnb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-15T00:25:20.000Z","updated_at":"2025-03-07T05:51:23.000Z","dependencies_parsed_at":"2023-04-22T15:58:42.248Z","dependency_job_id":null,"html_url":"https://github.com/bnb/metalsmith-barebones","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnb%2Fmetalsmith-barebones","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnb%2Fmetalsmith-barebones/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnb%2Fmetalsmith-barebones/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnb%2Fmetalsmith-barebones/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bnb","download_url":"https://codeload.github.com/bnb/metalsmith-barebones/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248877985,"owners_count":21176243,"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-10-15T11:11:05.693Z","updated_at":"2025-04-14T12:03:23.686Z","avatar_url":"https://github.com/bnb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Barebones Metalsmith\n## A boilerplate for creating websites with Metalsmtih\nI've created this repository to eliminate the task of reinstalling my core plugins and rewriting my core `build.js` file every time I start a Metalsmith website.\n\n## Included in this boilerplate\nIn order of inclusion inside `build.js`.\n\n#### Metalsmith\nThe core Metalsmith Module\n[Link][metalsmith] | [npm][metalsmith-npm] | [GitHub][metalsmith-github]\n\n#### Metalsmith Markdown\nConverts Markdown files (including front-matter) into HTML files.\n[Link][metalsmith-markdown] | [npm][metalsmith-markdown-npm] | [GitHub][metalsmith-markdown-github]\n\n#### Metalsmith Assets\nAdds static assets to your build directory\n[Link][metalsmith-assets] | [npm][metalsmith-assets-npm] | [GitHub][metalsmith-assets-github]\n\n#### Metalsmith Collections\nAdds collections of files to the global metadata\n[Link][metalsmith-collections] | [npm][metalsmith-collections-npm] | [GitHub][metalsmith-collections-github]\n\n#### Metalsmith Layouts\nA Metalsmith plugin that allows layouts (i.e. templates) to be used in conjunction with source files.\n[Link][metalsmith-layouts] | [npm][metalsmith-layouts-npm] | [GitHub][metalsmith-layouts-github]\n\n\n## How to use this boilerplate\nIn order of importance/implementation.\n\n#### Layouts\nCurrently, the boilerplate uses Handlebars templates for layouts. Edit the `layouts/index.hbs` file to modify the index template, which is applied to the `src/index.md` file. \n\nTo create a new layout, simply add a new file with the appropriate name to `layouts/` with the suffix of `.hbs`. To apply this layout to a template, add `layout: \u003clayout\u003e.hbs` to any and all (each layout can be applied to more than one) `.md` file in `src/` that you want it to be applied to.\n\n\n#### Assets \nTo add static assets to your `build/` directory, add them to the `assets/` folder in the structure you want them in. They are currently piped to `assets/` in the `build/` directory when the build script is run, but this can be changed in the `build.js` file's `.use(assets())` call with the `destination` property.\n\n#### Markdown source files\nAll Markdown source files should go into `src/`. They can be iterated, modified, and pulled from the `metalsmith-layouts` plugin, with the assistance of `metalsmith-collections` metadata and Handlebar's helper functions like `{{#each}}` and `{{#if}}`. Metadata can be pulled from inside the front-matter in these helper functions where the collection has been explicitly stated by simply calling the metadata's name; i.e. `{{title}}` to return `Title Here` from the `title: Title Here` metadata INSIDE the front-matter. \n\nHere is a template for basic front-matter that can be extended:\n\n```\n---\ntitle:\nlayout:\ncollection:\n---\n```\n\n#### Collections\nCollections have deliberately been left empty, so as not to force any certain pattern or become reliant on defaults. Look at the `metalsmith-collections` documentation to see how to implement them.\n\n## Build, Clean, and Deploy\n\n#### Build\nCompiles site from contents in `src/` and templates in `layouts/`.\n```bash\ncd /path/to/metalsmith-barebones\nnode build\n```\n\n#### Clean\nWipes your local `build/` folder clean.\n```bash\ncd /path/to/metalsmith-barebones\ngulp clean\n```\n\n#### Deploy\nPushes `build/` to the `gh-pages` branch on GitHub. **The gh-pages branch must already exist in your site's repository on GitHub.com!**\n```bash\ncd /path/to/metalsmith-barebones\ngulp deploy\n```\n\n\n[metalsmith]: http://metalsmith.io\n[metalsmith-npm]: https://www.npmjs.com/package/metalsmith\n[metalsmith-github]: https://github.com/metalsmith/metalsmith\n[metalsmith-markdown]: https://github.com/segmentio/metalsmith-markdown\n[metalsmith-markdown-npm]:https://www.npmjs.com/package/metalsmith-markdown\n[metalsmith-markdown-github]: https://github.com/segmentio/metalsmith-markdown\n[metalsmith-assets]:https://github.com/treygriffith/metalsmith-assets\n[metalsmith-assets-npm]: https://www.npmjs.com/package/metalsmith-assets\n[metalsmith-assets-github]: https://github.com/treygriffith/metalsmith-assets\n[metalsmith-collections]: https://github.com/segmentio/metalsmith-collections\n[metalsmith-collections-npm]:https://www.npmjs.com/package/metalsmith-collections\n[metalsmith-collections-github]:https://github.com/segmentio/metalsmith-collections\n[metalsmith-layouts]:https://github.com/superwolff/metalsmith-layouts\n[metalsmith-layouts-npm]: https://www.npmjs.com/package/metalsmith-layouts\n[metalsmith-layouts-github]: https://github.com/superwolff/metalsmith-layouts","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbnb%2Fmetalsmith-barebones","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbnb%2Fmetalsmith-barebones","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbnb%2Fmetalsmith-barebones/lists"}