Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github-pages-tags

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-pages-tags

A package to generate tags pages to github pages website

  • 1.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

https://nodei.co/npm/github-pages-tags.png?downloads=true&downloadRank=true&stars=true

HitCount contributions welcome

Introduction

You are display tags list on each post in your github pages website and this is good.
But, usually, you want that those tags will be links to a tag page which will display all the posts which contains the tag, right?
The problem is that jekyll is a static "language" so you have to generate each page as static file.
Will you do this manually? I don't think so.

How it works?

After the package have been installed, this package modify the package.json and add to it a postcommit script.
This script is reading all the tags in the site and generate a .md file for each of them under /tags folder.

Installation

Step 1
npm install github-pages-tags --save
Step 2

create a tag.html in layout folder which will be the tag template. This file should looks like:

---
layout: default
---

<h1>`{{ page.title }}` posts</h1>

<div class="view">
  {% for post in site.posts %}
    {% if post.tags contains page.title %}
      {% include post-item.html post=post last=forloop.last %}
    {% endif %}
  {% endfor %}
</div>
Step 3 (optinal)

You can custom the plugin behavior by creating github-pages-tags.config.js github-pages-tags.config.json.

Here are the options:

{
  // tag page title
  "title": "{{tag}}}",
  // tag page meta description
  "description": "Here are all the posts that related to {{tag}}",
  // generate only tag who have more than `minPostCount` posts. See link below:
  "minPostCount": 0
}

Notes

  • {{tag}} will be replaced by the actuall tag name.
  • minPostCount - (Why is good?)

Keywords

FAQs

Package last updated on 11 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc