{"id":15288514,"url":"https://github.com/vduseev/jekyll-dry","last_synced_at":"2026-02-26T10:12:43.555Z","repository":{"id":56878540,"uuid":"122550006","full_name":"vduseev/jekyll-dry","owner":"vduseev","description":"Don't Repeat Yourself plugin for Jekyll to reuse fragments of pages by including them.","archived":false,"fork":false,"pushed_at":"2020-02-29T18:51:52.000Z","size":18,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T17:56:38.632Z","etag":null,"topics":["ddd","documentation","documentation-tool","documentation-toolchain","jekyll","jekyll-plugin"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vduseev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-22T23:54:56.000Z","updated_at":"2019-11-04T23:27:22.000Z","dependencies_parsed_at":"2022-08-20T11:40:29.799Z","dependency_job_id":null,"html_url":"https://github.com/vduseev/jekyll-dry","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/vduseev%2Fjekyll-dry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vduseev%2Fjekyll-dry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vduseev%2Fjekyll-dry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vduseev%2Fjekyll-dry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vduseev","download_url":"https://codeload.github.com/vduseev/jekyll-dry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245212304,"owners_count":20578443,"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":["ddd","documentation","documentation-tool","documentation-toolchain","jekyll","jekyll-plugin"],"created_at":"2024-09-30T15:49:51.026Z","updated_at":"2025-10-29T08:34:54.331Z","avatar_url":"https://github.com/vduseev.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jekyll-dry\n\n[![Build Status](https://travis-ci.org/vduseev/jekyll-dry.svg?branch=master)](https://travis-ci.org/vduseev/jekyll-dry)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/f261f89a633e47e3964ecc37bb826d4f)](https://www.codacy.com/manual/vduseev/jekyll-dry?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=vduseev/jekyll-dry\u0026amp;utm_campaign=Badge_Grade)\n\nJekyll plugin that helps you to implement the DRY (Don't Repeat Yourself) principle while writing documentation using Jekyll.\nThe plugin allows you to reuse any fragments of markdown multiple times across a single Jekyll website. The fragments can include Liquid syntax and tags.\n\n## Table of contents\n\n* User Guide:\n  * [Usage](#usage)\n  * [Installation](#installation)\n  * [Incompatibility with GitHub Pages](#incompatibility-with-github-pages)\n* Implementation:\n  * [Plugin's architecture](architecture.md)\n  * [Detailed Design](detailed_design.md)\n\n## Usage\n\n### Fragment's beginning tag: `{% frag ... %}`\n\n`frag` tag marks the beginning of a reusable fragment and assigns a unique id to it. Everything between `frag` and `endfrag` tags with unique id is considered a unique reusable fragment that can be included to any page.\n\n\u003ca name=\"example-of-frag-usage\"\u003eExample of usage\u003c/a\u003e:\n```\nIt was decided that the amount of dependencies of the executable will\nbe kept at minimum. For that reason {% frag dependencies %}the only\ndependency is Python's `argparse` library{% endfrag dependencies %}.\n```\n\nAs a result of the above markup the `dependencies` file will be generated and will contain following text:\n```\nthe only dependency is Python's `argparse` library\n```\n\nThe generated file is now available for inclusion at any page, including the page where it was initially declared. During generation process `frag` tag is replaced in page with an empty string.\n\n### Fragment's end tag: `{% endfrag ... %}`\n\n`endfrag` tag only marks the end of the fragment declared by `frag` tag and is only used by it. After Jekyll processes the page `endfrag` disappears.\n\nIf no matching `endfrag` is found for a given `frag`, then that `frag` will not be counted as a valid fragment and will not produce an include file.\n\n\u003ca name=\"example-of-endfrag-usage\"\u003eExample of usage\u003c/a\u003e: [see above](#example-of-frag-usage).\n\nDuring generation process `endfrag` tag is replaced in page with an empty string.\n\n### Fragment embedding tag: `{% \u003e ... %}`\n\n`\u003e` inclusion tag that searches for an include file with a given unique id generated by `frag` tag. Works in exactly same way as traditional `include` tag, but does not use parameters.\n\n\u003ca name=\"example-of-inclusion-usage\"\u003eExample of usage:\u003c/a\u003e\n```\nTesting will require a test suite that covers a set of test cases\nderived from initial use cases. However, since {% \u003e dependencies %},\nthe testing will be entirely implemented using just the `py.test`\nlibrary.\n```\n\nWhich will produce the following result:\n\nTesting will require a test suite that covers a set of test cases derived from initial use cases. However, since the only\ndependency is Python's `argparse` library, the testing will be entirely implemented using just the `py.test` library.\n\n## Installation\n\nDrop the `jekyll-dry.rb` file into the `_plugins` directory of the website as described in the first option of enabling a plugin in [Jekyll documentation](https://jekyllrb.com/docs/plugins/#installing-a-plugin):\n```\nIn your site source root, make a _plugins directory. Place your plugins\nhere. Any file ending in *.rb inside this directory will be loaded\nbefore Jekyll generates your site.\n```\n\n## Incompatibility with GitHub Pages\n\nSince this is a custom plugin which is not included in the code set of GitHub pages plugins it will not work with GitHub's automatic website generation.\n\nYou will have to generate the website locally and then push the contents of the `_site` folder to GitHub in order to publish your website.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvduseev%2Fjekyll-dry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvduseev%2Fjekyll-dry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvduseev%2Fjekyll-dry/lists"}