All Projects → brob → eleventy-plugin-blog-tools

brob / eleventy-plugin-blog-tools

Licence: other
A collection of shortcodes, filters and tags that make blogging on 11ty more fun

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to eleventy-plugin-blog-tools

11ty-tailwind-jit
Try editing some Tailwind in this repo while running in dev. It's SO FAST!
Stars: ✭ 17 (-58.54%)
Mutual labels:  jamstack, 11ty
11up
A utility to create an 11ty site scaffold from one of a number of site templates. Mostly just Phil Hawksworth's regular starting points
Stars: ✭ 25 (-39.02%)
Mutual labels:  jamstack, 11ty
smix-eleventy-starter
A standards-respecting starter kit for Eleventy. Go Indie.
Stars: ✭ 108 (+163.41%)
Mutual labels:  jamstack, 11ty
frontenso-11ty-starter
Production-ready 11ty+Gulp+Webpack Starter that features Nunjucks, SASS, TailwindCSS (with JIT complier), and ESNext.
Stars: ✭ 24 (-41.46%)
Mutual labels:  jamstack, 11ty
agilitycms-eleventy-starter-2020
A sample Eleventy starter that uses Agility CMS and aims to be a foundation for building fully static sites using 11ty and Agility CMS.
Stars: ✭ 18 (-56.1%)
Mutual labels:  jamstack, 11ty
eleventy-plugin-prismic
Eleventy plugin and shortcodes to fetch and present Prismic content
Stars: ✭ 39 (-4.88%)
Mutual labels:  11ty, 11ty-plugin
fernfolio-11ty-template
The super simple portfolio template built with Eleventy and Netlify CMS
Stars: ✭ 64 (+56.1%)
Mutual labels:  jamstack, 11ty
11ta-template
Deeply customizable, full-featured, ready to publish blog template built with 11ty, TailwindCSS, & Alpine.js
Stars: ✭ 98 (+139.02%)
Mutual labels:  jamstack, 11ty
eleventy-plugin-cloudinary
An Eleventy shortcode that allows you to add an image from your cloudinary account
Stars: ✭ 28 (-31.71%)
Mutual labels:  11ty, 11ty-plugin
COVID-19-STAT
A web application to keep track of COVID-19 numbers & growth across the world
Stars: ✭ 19 (-53.66%)
Mutual labels:  jamstack
express-mquery
Expose mongoose query API through HTTP request.
Stars: ✭ 37 (-9.76%)
Mutual labels:  filters
laravel-shortcodes
Wordpress based Shortcodes for Laravel
Stars: ✭ 19 (-53.66%)
Mutual labels:  shortcodes
thvu-blog
My digital home on the internet.
Stars: ✭ 51 (+24.39%)
Mutual labels:  jamstack
magic-admin-js
Magic admin Node.js SDK makes it easy to leverage Decentralized ID tokens to protect routes and restricted resources for your application.
Stars: ✭ 62 (+51.22%)
Mutual labels:  jamstack
TuSDK-for-Android-demo
TuSDK Android 图像 SDK Demo
Stars: ✭ 93 (+126.83%)
Mutual labels:  filters
site
🏁📑 Static site generator for landing pages, docs, and more
Stars: ✭ 31 (-24.39%)
Mutual labels:  jamstack
snipcart-gatsby-grav
Grav as Headless CMS Tied to Gatsby with GraphQL Schema
Stars: ✭ 27 (-34.15%)
Mutual labels:  jamstack
sutanlab.id
☕️ My Personal Homepage & Blog site with NextJS. 🇺🇸 🇮🇩
Stars: ✭ 39 (-4.88%)
Mutual labels:  jamstack
navigator-hugo
Navigator Business theme powered by Hugo. It also could be used for a personal portfolio.
Stars: ✭ 133 (+224.39%)
Mutual labels:  jamstack
gatsby-starter-developer-diary
An official Gatsby blog template designed for web developers. Blazing fast, it includes beautful web developer topic tags and social-media links
Stars: ✭ 76 (+85.37%)
Mutual labels:  jamstack

Blog Tools for 11ty

This plugin is a series of shortcodes and filters that aim to help you write and organize your blog

Install instructions

Available on npm.

npm install eleventy-plugin-blog-tools --save

Open up your Eleventy config file (probably .eleventy.js) and add the plugin:

const blogTools = require("eleventy-plugin-blog-tools");
module.exports = function(eleventyConfig) {
  eleventyConfig.addPlugin(blogTools);
};

Usage

There are multiple shortcodes and filters in this plugin. Each has its own usage.

Excerpt

This custom tag creates an excerpt from a page with front matter and/or standard markdown.

Main Usage:

    {% excerpt post %}

Where post is an instance of a markdown file being pulled in via an 11ty template engine.

The Excerpt is built from one of three options:

  1. First Excerpt looks for a pair of HTML comments in your markdown specifying a start and end point for the excerpt. <!-- excerpt start --> and <!-- excerpt end --> (capitalization not important)
  2. If no start and end specified, the Excerpt tag will then look for the excerpt property in your MD file's frontmatter.
  3. If no excerpt is found in frontmatter, the tag will pull the first paragraph of the post.

YouTube

The YouTube shortcode takes a YouTube video ID and creates the markup for a fluidly-responsive YouTube embed.

{% youtube "idstring" %}

Vimeo

The YouTube shortcode takes a Vimeo video ID and creates the markup for a fluidly-responsive Vimeo embed.

{% vimeo "idstring" %}

CodePen

The CodePen shortcode takes multiple values to customize your embed.

{% codepen "URL", "codepen tabs string", "unitlessHeight", "theme ID" %}

{% codepen "https://codepen.io/url/path" %}
{% codepen "http://codepen.io/brob/pen/vGRBeQ/", "css,result", "900", "26704"  %}

The various options have a required order (hopefully that will change in the future):

  • url: The full URL to your pen
  • tabs: String of the tabs of your codepen to display (default: "html,result")
  • height: A unitless value of the height in pixels (default: "300")
  • theme: If you have a saved theme in your Pens, you can use them with the id of the theme (default: "");

The 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.

Related Filter

The related filter will pull items from a list based on parameters passed to the function.

Usage

The basic usage is to filter a collection based on an array of items and a threshold.

Syntax: {{ collections.posts | related(<sort-field-key>, <sort-field-data>, <threshold-integer Defaults to 1>, <URL-to-Exclude-optional>)}}

The threshold integer is meant to force a number of array items in common. Defaults to 1.

{% for post in collections.posts | related("sortField", sortField, 1) %}
  {{ post.data.title }}
{% endfor %}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].