npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gitbook-plugin-journal-summary

v0.0.3

Published

Plugin to generate gitbook's summary file for journal-style entries

Downloads

9

Readme

gitbook-plugin-journal-summary

Build Status Coverage Status Dependencies Status npm version

This is a Gitbook plugin automatically generates your summary file(s) for your journal entries, effectively allowing you to use gitbook to compile your journal. It will automatically generate the SUMMARY.md and, optionally, intermediate summary files.

Warning

This plugin will overwrite your SUMMARY.md file, if any. This plugin is meant to be used solely as a journaling helper so it's not a good idea to use it in a project where you want to be able to edit the SUMMARY.md file manually.

Setup

Add this to your book.json:


{
  "plugins": ["journal-summary"]
}

Then run gitbook build

If you run gitbook serve directly it might not correctly pickup the newly generated summary files, so I recommend running gitbook build first

Usage

This plugin expects your Markdown Journal Entries to be named in this pattern: YYYY-MM-DD.md (e.g. 2017-12-29). It does not matter what folders or how many level deep you put your Markdown files. The plugin will find all the Markdown files that match the date format, build a tree with levels for Year, Month, and the individual entries as leafs. It will then output that in the correct format to the SUMMARY.md file.

For example, even with this messy (or "wrong") folder structure:

|
|- 2017-09-10.md
|
 \- 2017
|    \- 10
|        |- 2017-10-01.md
|  
 \- 2016
     |- 2016-02-28.md
     |- 2017-10-02.md
     \- 09
        |- 2016-09-01.md

The plugin will parse only the filenames, regardless of what folder the file is in, generating the correct working tree:

(root)
  |
   \_ 2016
  |    \_ February
  |   |      \_ 28th
  |    \_ September   
  |          \_ 1st  
   \_ 2017  
       \_ September   
      |     \_ 10th
       \_ October
            \_ 1st
           |
            \_ 2nd

Which will generate the following SUMMARY.md file (assuming generateAll = true):

  # Book Title

  - [2016](summaries/2016.md)
    - [February](summaries/2016-February.md)
      - [28th](/2016/2016-02-28)
    - [September](summaries/2016-September.md)
      - [1st](/2016/09/2016-09-01.md)
  - [2017](summaries/2017.md)
    - [September](summaries/2017-September.md)
      - [10th](2017-09-10.md)
    - [October](/summaries/2017-October)
      - [1st](/2017/10/2017-10-01.md)
      - [2nd](/2016/2017-10-02.md)

Configuration

Optionally, you can set the generateAll option to true if you want the plugin to also generate intermediate summary files for Year and Month levels, i.e. if you want the Year and Month levels to be clickable and to contain a summary of their contents. That option is to false by default. To set that option to true, add the following in your book.json file:

  "pluginsConfig": {
    "journal": {
      "generateAll": true
    }
  }

An example of a complete book.json file could look like this:

{
    "title": "Test Book",
    "plugins": ["journal-summary"],
    "pluginsConfig": {
      "journal": {
        "generateAll": true
      }
    }
}

Credit

Initially based on julianxhokaxhiu's gitbook plugin.