{"id":13426068,"url":"https://github.com/brob/eleventy-plugin-blog-tools","last_synced_at":"2025-04-12T09:31:11.232Z","repository":{"id":47974290,"uuid":"205416541","full_name":"brob/eleventy-plugin-blog-tools","owner":"brob","description":"A collection of shortcodes, filters and tags that make blogging on 11ty more fun","archived":false,"fork":false,"pushed_at":"2024-02-09T19:24:12.000Z","size":232,"stargazers_count":52,"open_issues_count":20,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T04:34:45.561Z","etag":null,"topics":["11ty","11ty-plugin","filters","jamstack","shortcodes"],"latest_commit_sha":null,"homepage":"","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/brob.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-08-30T16:13:50.000Z","updated_at":"2024-03-21T15:21:08.000Z","dependencies_parsed_at":"2023-12-15T21:42:49.604Z","dependency_job_id":"66ab09a2-4e3f-4d7c-a0f0-e8a65821ad9d","html_url":"https://github.com/brob/eleventy-plugin-blog-tools","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/brob%2Feleventy-plugin-blog-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brob%2Feleventy-plugin-blog-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brob%2Feleventy-plugin-blog-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brob%2Feleventy-plugin-blog-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brob","download_url":"https://codeload.github.com/brob/eleventy-plugin-blog-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248546017,"owners_count":21122246,"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":["11ty","11ty-plugin","filters","jamstack","shortcodes"],"created_at":"2024-07-31T00:01:25.613Z","updated_at":"2025-04-12T09:31:10.924Z","avatar_url":"https://github.com/brob.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","others"],"sub_categories":[],"readme":"# Blog Tools for 11ty\n\nThis plugin is a series of shortcodes and filters that aim to help you write and organize your blog\n\n## Install instructions\n\nAvailable on [npm](https://www.npmjs.com/package/eleventy-plugin-blog-tools).\n\n```\nnpm install eleventy-plugin-blog-tools --save\n```\n\nOpen up your Eleventy config file (probably `.eleventy.js`) and add the plugin:\n\n```\nconst blogTools = require(\"eleventy-plugin-blog-tools\");\nmodule.exports = function(eleventyConfig) {\n  eleventyConfig.addPlugin(blogTools);\n};\n```\n\n## Usage\n\nThere are multiple shortcodes and filters in this plugin. Each has its own usage.\n\n\n### Excerpt\n\nThis custom tag creates an excerpt from a page with front matter and/or standard markdown. \n\nMain Usage:\n\n```html\n    {% excerpt post %}\n```\n\nWhere `post` is an instance of a markdown file being pulled in via an 11ty template engine.\n\nThe Excerpt is built from one of three options:\n1. Excerpt first looks for a singular `\u003c!-- excerpt --\u003e` tag in the markdown.\n1. Then, Excerpt looks for a pair of HTML comments in your markdown specifying a start and end point for the excerpt. `\u003c!-- excerpt start --\u003e` and `\u003c!-- excerpt end --\u003e` (capitalization not important)\n2. If no start and end specified, the Excerpt tag will then look for the `excerpt` property in your MD file's frontmatter.\n3. If no `excerpt` is found in frontmatter, the tag will pull the first paragraph of the post.\n\n### YouTube\n\nThe YouTube shortcode takes a YouTube video ID and creates the markup for a fluidly-responsive YouTube embed.\n\n```\n{% youtube \"idstring\" %}\n```\n### Vimeo\n\nThe Vimeo shortcode takes a Vimeo video ID and creates the markup for a fluidly-responsive Vimeo embed.\n\n```\n{% vimeo \"idstring\" %}\n```\n\n\n### CodePen\n\nThe CodePen shortcode takes multiple values to customize your embed.\n```\n{% codepen \"URL\", \"codepen tabs string\", \"unitlessHeight\", \"theme ID\" %}\n\n{% codepen \"https://codepen.io/url/path\" %}\n{% codepen \"http://codepen.io/brob/pen/vGRBeQ/\", \"css,result\", \"900\", \"26704\"  %}\n\n```\n\nThe various options have a required order (hopefully that will change in the future): \n* `url`: The full URL to your pen \n* `tabs`: String of the tabs of your codepen to display (default: `\"html,result\"`)\n* `height`: A unitless value of the height in pixels (default: `\"300\"`)\n* `theme`: If you have a saved theme in your Pens, you can use them with the id of the theme (default: `\"\"`);\n\nThe first argument is the only required argument and it's the Pen's full URL. In Nunjucks, they need to be comma separated, in Liquid commas are optional.\n\n## Related Filter\n\nThe related filter will pull items from a list based on parameters passed to the function.\n\n### Usage\n\nThe basic usage is to filter a collection based on an array of items and a threshold.\n\nSyntax: `{{ collections.posts | related(\u003csort-field-key\u003e, \u003csort-field-data\u003e, \u003cthreshold-integer Defaults to 1\u003e, \u003cURL-to-Exclude-optional\u003e)}}`\n\nThe threshold integer is meant to force a number of array items in common. Defaults to 1.\n\n```\n{% for post in collections.posts | related(\"sortField\", sortField, 1) %}\n  {{ post.data.title }}\n{% endfor %}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrob%2Feleventy-plugin-blog-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrob%2Feleventy-plugin-blog-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrob%2Feleventy-plugin-blog-tools/lists"}