{"id":20856479,"url":"https://github.com/cityofnewyork/patterns-docs","last_synced_at":"2026-04-02T01:59:39.982Z","repository":{"id":57132578,"uuid":"237027911","full_name":"CityOfNewYork/patterns-docs","owner":"CityOfNewYork","description":"Reusable documentation for pattern libraries created for the Patterns CLI. Maintained by @nycopportunity","archived":false,"fork":false,"pushed_at":"2022-12-21T20:30:13.000Z","size":121,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-02-24T05:16:30.070Z","etag":null,"topics":["cli","documentation","nycopportunity","patterns","pttrn"],"latest_commit_sha":null,"homepage":"https://nycopportunity.github.io/patterns-framework/","language":null,"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/CityOfNewYork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-29T16:21:32.000Z","updated_at":"2021-12-13T15:22:33.000Z","dependencies_parsed_at":"2023-01-30T04:40:11.584Z","dependency_job_id":null,"html_url":"https://github.com/CityOfNewYork/patterns-docs","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CityOfNewYork%2Fpatterns-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CityOfNewYork%2Fpatterns-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CityOfNewYork%2Fpatterns-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CityOfNewYork%2Fpatterns-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CityOfNewYork","download_url":"https://codeload.github.com/CityOfNewYork/patterns-docs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243230066,"owners_count":20257640,"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":["cli","documentation","nycopportunity","patterns","pttrn"],"created_at":"2024-11-18T04:32:01.526Z","updated_at":"2025-12-26T05:54:54.755Z","avatar_url":"https://github.com/CityOfNewYork.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Patterns Documentation\n\nReusable documentation for pattern libraries created with the [`@nycopportunity/pttrn`](https://github.com/cityofnewyork/patterns-cli) CLI. Save time on writing common documentation.\n\n## Table of Contents\n\n* [Available Guides](#available-guides)\n* [Template Variables](#template-variables)\n\n### Available Guides\n\nName                                        | Description\n--------------------------------------------|-\n[Installation](./installation.md)           | How to install pattern libraries in projects that will use them.\n[Contributing](./contributing.md)           | A general developers contribution and style guide.\n[Patterns](./patterns.md)                   | An overview of the design patterns methodology for elements, components, objects, and utilities.\n[Prototyping](./prototyping.md)             | A guide on prototyping with pattern libraries and Figma using the HTML to Figma plugin.\n[Tailwindcss](./tailwindcss/tailwindcss.md) | An introduction to [Tailwindcss](https://tailwindcss.com/) and Slm markup that will use a [tailwindcss.js configuration](https://tailwindcss.com/docs/configuration) to create an interactive table demonstrating the configuration.\n\nTo include them in other pattern library static documentation sites use the `this.include()` method and double equals sign `==` render markdown files as HTML. Pass the full path to the desired file in the node modules directory.\n\n```pug\n== this.include('../node_modules/@nycopportunity/pttrn-docs/installation.md')\n```\n\n### Package variables\n\nThe following template variables are used by the documentation to refer to paths specific to your project. Template variables set to `this.package` refer to values stored in your project's **package.json** file. Some are required for [NPM package.json files](https://docs.npmjs.com/cli/v6/configuring-npm/package-json) and others are custom attributes.\n\nTemplate Variable                           | Description\n--------------------------------------------|-\n`this.package.name`                         | The package name. See [NPM package.json documentation](https://docNPMjs.com/cli/v6/configuring-npm/package-json#name) for details. This may or may not include an [NPM Organization](https://docs.npmjs.com/organizations) prefix.\n`this.package.nice`                         | A human readable package or pattern library name.\n`this.package.version`                      | The package semantic version. See [NPM package.json documentation](https://docs.npmjs.com/cli/v6/configuring-npm/package-json#version) for details.\n`this.package.cdn.url`                      | The preferred CDN url. Usually matches the pattern `https://cdn.jsdelivr.net/gh/{{ GitHub Organization }}/{{ repo }}`. This example uses [JS Delivr](https://www.jsdelivr.com/).\n`this.package.cdn.source`                   | The GitHub repository url. Usually matches the pattern `https://github.com/{{ GitHub Organization }}/{{ repo }}`\n`this.package.cdn.archive`                  | The GitHub archive url. Usually matches the pattern `https://github.com/{{ GitHub Organization }}/{{ repo }}/archive`.\n`this.package.cdn.styles`                   | The local path to the fully distributed stylesheet module.\n`this.package.cdn.scripts`                  | The local path to the fully distributed JavaScript module.\n`this.package.cdn.svg`                      | The local path to the fully distributed SVG sprite.\n`this.package.cdn.tailwindcss`              | The local path to the fully distributed Tailwindcss utility CSS stylesheet.\n`this.package.cdn.tailwindsass`             | The local path to the fully distributed Tailwindcss Utility Sass stylesheet.\n`this.package.instantiations.scripts`       | The main script module name used to instantiate the global pattern script. For example `new Default()` would instantiate a module named `Default`.\n\nBelow is how template variables are set in a sample **package.json** file.\n\n```json\n{\n  \"name\": \"@npm-organization/pattern-library\",\n  \"nice\": \"My Pattern Library\",\n  \"version\": \"1.0.0\",\n  \"cdn\": {\n    \"url\": \"https://cdn.jsdelivr.net/gh/github-organization/pattern-library\",\n    \"source\": \"https://github.com/github-organization/pattern-library\",\n    \"archive\": \"https://github.com/github-organization/pattern-library/archive\",\n    \"styles\": \"/dist/scripts/default.css\",\n    \"scripts\": \"/dist/scripts/default.js\",\n    \"svg\": \"/dist/svg/svgs.svg\",\n    \"tailwindcss\": \"/dist/styles/tailwindcss.css\",\n    \"tailwindsass\": \"/dist/styles/_tailwindcss.scss\"\n  },\n  \"instantiations\": {\n    \"scripts\": \"Default\"\n  },\n  // ...\n}\n```\n\n## Slm Variables\n\nAdditional template variables can be set in the project **config/slm.js**.\n\nTemplate Variable          | Description\n---------------------------|-\n`this.marked.headerPrefix` | Prefix for markdown file heading IDs. This should be set to a blank string if no prefix is desired `''`. This assists with inline anchor links.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcityofnewyork%2Fpatterns-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcityofnewyork%2Fpatterns-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcityofnewyork%2Fpatterns-docs/lists"}