1.0.3 • Published 5 months ago

@themaymeow/hugo-posts-graph v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

Posts graph for Hugo

Generate a data file to create a post graph from posts.

Usage

Installation

# Hugo by default dont need NPM
npm init
npm i @themaymeow/rpo-api-client

Using in your script

import stats from "@themaymeow/hugo-posts-graph/hugo.js";
stats.getDates("content/posts")

The script above will create a new file data/postGraph.json that you can use to create the graph.

Using with Hugo

To display the result on your page, you need to implement a new layout or shortcode. I have made examples of both sortcode and style. You are free to make your own, but if you want to start right now:

Note that you will need to use hugo extended version to generate CSS from SCSS files.

Create a new page e.g.: hugo new stats.md and put following code somewhere in the content of your page.

{{< post-graph >}}

The result:

npm.io

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago