{"id":20691370,"url":"https://github.com/metafizzy/grunt-fizzy-docs","last_synced_at":"2025-07-09T10:34:22.185Z","repository":{"id":12081308,"uuid":"14668950","full_name":"metafizzy/grunt-fizzy-docs","owner":"metafizzy","description":"Grunt tasks for Masonry, Isotope, and Packery docs","archived":false,"fork":false,"pushed_at":"2014-10-08T02:11:25.000Z","size":157,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-04T23:19:14.147Z","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/metafizzy.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":"2013-11-24T20:47:32.000Z","updated_at":"2023-06-23T07:40:13.000Z","dependencies_parsed_at":"2022-09-10T11:01:45.234Z","dependency_job_id":null,"html_url":"https://github.com/metafizzy/grunt-fizzy-docs","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/metafizzy/grunt-fizzy-docs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metafizzy%2Fgrunt-fizzy-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metafizzy%2Fgrunt-fizzy-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metafizzy%2Fgrunt-fizzy-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metafizzy%2Fgrunt-fizzy-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metafizzy","download_url":"https://codeload.github.com/metafizzy/grunt-fizzy-docs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metafizzy%2Fgrunt-fizzy-docs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264440610,"owners_count":23608737,"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-16T23:16:28.535Z","updated_at":"2025-07-09T10:34:22.158Z","avatar_url":"https://github.com/metafizzy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grunt-fizzy-docs\n\nGrunt tasks for [Masonry](http://masonry.desandro.com), [Isotope](http://isotope.metafizzy.co), and [Packery](http://packery.docs) docs.\n\nView documentation sources to see this in action.\n\n+ [github.com/desandro/masonry-docs](https://github.com/desandro/masonry-docs)\n+ [github.com/metafizzy/isotope-docs](https://github.com/metafizzy/isotope-docs)\n+ [github.com/metafizzy/packery-docs](https://github.com/metafizzy/packery-docs)\n\n## int-bower\n\nIntegrates bower sources.\n\n+ Adds .js and .css (taken from `main` in `bower.json`) files to `concat` task\n+ Adds main files to `copy` task\n+ Saves .js and .css files to JSON with `dataDir` option\n\n``` js\ngrunt.initConfig({\n  // global settings\n  dataDir: '_tasks/data'\n});\n```\n\n## template\n\nGenerates site HTML with [Handlebars](http://handlebarsjs.com/) templating.\n\n``` js\n  grunt.initConfig({\n  template: {\n    docs: {\n      files: {\n        // dest: src\n        'build/': '_content/**/*.*'\n      },\n      options: {\n        // load all templates from files\n        templates: '_templates/*.mustache',\n        // default template used\n        defaultTemplate: 'page',\n        // any other partials you want to hard code\n        partialFiles: {\n          'submitting-issues': 'bower_components/masonry/CONTRIBUTING.mdown'\n        }\n      }\n    }\n  }\n});\n```\n\nSource files can contain JSON front matter, sort of like [Jekyll's YAML front matter](http://jekyllrb.com/docs/frontmatter/). \n\n    ---\n    {\n      \"title\": \"FAQ\",\n      \"nav\": [\n        \"Overlapping\",\n        \"Browser support\",\n        \"Difference between Isotope and Masonry\",\n        \"First item breaks grid\"\n      ]\n    }\n    ---\n\n### Templating variables\n\nJSON front matter is then passed in with the `page` variable for templating.\n\n``` html\n\u003ch1\u003e{{page.title}}\u003c/h1\u003e\n\u003cul class=\"nav\"\u003e\n  {{#each page.nav}}\n    \u003cli\u003e\u003ca href=\"#{{slug this}}\"\u003e{{this}}\u003c/a\u003e\u003c/li\u003e\n  {{/each}}\n\u003c/ul\u003e\n```\n\nOther variables:\n\n+ `basename` - the name of the file. i.e. \"index\" for \"content/index.html\"\n+ `ref=\"{{root_path}}layout-modes/masonry` - `--dev` command flag, for `grunt default --dev`\n+ `site`\n  - `site.js` - all .js files\n  - `site.css` - all .css files\n\nHere's how I use those variables. See [desandro/masonry-docs/_templates/page.mustache](https://github.com/desandro/masonry-docs/blob/master/_templates/page.mustache)\n\n``` html\n\u003c/head\u003e\n  {{#if is_dev}}\n    \u003c!-- DEV MODE - including each .css file --\u003e\n    {{#each site.css}}\n      \u003clink rel=\"stylesheet\" href=\"{{this}}\" /\u003e\n    {{/each}}\n  {{else}}\n    {{! in production, just include concat CSS }}\n    \u003clink rel=\"stylesheet\" href=\"css/masonry-docs.css\" /\u003e\n  {{/if}}\n\u003c/head\u003e\n\n{{! unique page name for CSS, data-page to trigger JS }}\n\u003cbody class=\"{{basename}}-page\" data-page=\"{{basename}}\"\u003e \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetafizzy%2Fgrunt-fizzy-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetafizzy%2Fgrunt-fizzy-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetafizzy%2Fgrunt-fizzy-docs/lists"}