Permalink
Browse files

generate docs

  • Loading branch information...
1 parent 7a2a642 commit ae5a62be2609ba794d58c468e0093f0931aeec3a @jonschlinkert jonschlinkert committed Jul 19, 2016
Showing with 128 additions and 119 deletions.
  1. +5 −30 .verb.md
  2. +96 −66 README.md
  3. +10 −8 docs/patterns.md
  4. +17 −15 docs/seo.md
View
@@ -1,43 +1,18 @@
-# {%= name %} {%= badge("fury") %}
-
-> {%= description %}
-
-## Table of Contents
-
-<!-- toc -->
-
Also see the [Gruntfile](./Gruntfile.js) for example usage.
## Quickstart
-{%= docs("quickstart") %}
+{%= doc("quickstart") %}
## The "permalinks" plugin
### Patterns
-{%= docs("patterns") %}
+{%= doc("patterns") %}
### Options
-{%= docs("options") %}
+{%= doc("options") %}
### Usage Examples
-{%= docs("examples") %}
+{%= doc("examples") %}
### SEO
-{%= docs("seo") %}
-
-## Contributing
-{%= include("contributing") %}
-
-## Other grunt-assemble plugins
-{%= related(verb.related.list, {remove: name}) %}
-
-## Authors
-{%= include("author") %}
-
-## License
-{%= copyright() %}
-{%= license() %}
-
-***
-
-{%= include("footer") %}
+{%= doc("seo") %}
View
@@ -1,25 +1,33 @@
-# grunt-assemble-permalinks [![NPM version](https://badge.fury.io/js/grunt-assemble-permalinks.svg)](http://badge.fury.io/js/grunt-assemble-permalinks)
+# grunt-assemble-permalinks [![NPM version](https://img.shields.io/npm/v/grunt-assemble-permalinks.svg?style=flat)](https://www.npmjs.com/package/grunt-assemble-permalinks) [![NPM downloads](https://img.shields.io/npm/dm/grunt-assemble-permalinks.svg?style=flat)](https://npmjs.org/package/grunt-assemble-permalinks) [![Build Status](https://img.shields.io/travis/assemble/grunt-assemble-permalinks.svg?style=flat)](https://travis-ci.org/assemble/grunt-assemble-permalinks)
-> Permalinks plugin for Assemble, the static site generator for Grunt.js, Yeoman and Node.js. This plugin enables powerful and configurable URI patterns, [Moment.js](http://momentjs.com/) for parsing dates, much more.
+Permalinks plugin for Assemble, the static site generator for Grunt.js, Yeoman and Node.js. This plugin enables powerful and configurable URI patterns, [Moment.js](http://momentjs.com/) for parsing dates, much more.
## Table of Contents
-<!-- toc -->
-
-* [Quickstart](#quickstart)
-* [The "permalinks" plugin](#the--permalinks--plugin)
- - [Patterns](#patterns)
- - [Options](#options)
- - [Usage Examples](#usage-examples)
- - [SEO](#seo)
-* [Contributing](#contributing)
-* [Other grunt-assemble plugins](#other-grunt-assemble-plugins)
-* [Authors](#authors)
-* [License](#license)
-
-_(Table of contents generated by [verb])_
-
-<!-- tocstop -->
+- [Install](#install)
+- [Quickstart](#quickstart)
+- [The "permalinks" plugin](#the-permalinks-plugin)
+ * [Patterns](#patterns)
+ * [Options](#options)
+ * [Usage Examples](#usage-examples)
+ * [SEO](#seo)
+- [About](#about)
+ * [Related projects](#related-projects)
+ * [Contributing](#contributing)
+ * [Building docs](#building-docs)
+ * [Running tests](#running-tests)
+ * [Author](#author)
+ * [License](#license)
+
+_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_
+
+## Install
+
+Install with [npm](https://www.npmjs.com/):
+
+```sh
+$ npm install --save grunt-assemble-permalinks
+```
Also see the [Gruntfile](./Gruntfile.js) for example usage.
@@ -54,9 +62,8 @@ module.exports = function(grunt) {
```
If everything was installed and configured correctly, you should be ready to go!
-## The "permalinks" plugin
-### Patterns
+## The "permalinks" plugin
## Permalink structure
@@ -65,15 +72,17 @@ If everything was installed and configured correctly, you should be ready to go!
Permalinks are **appended to the dest directory**. So given this config:
```js
-assemble: {
- blog: {
- options: {
- permalinks: {
- structure: ':year/:month/:day/:basename:ext'
+{
+ assemble: {
+ blog: {
+ options: {
+ permalinks: {
+ structure: ':year/:month/:day/:basename:ext'
+ }
+ },
+ files: {
+ 'blog/archives/': ['archives/*.hbs']
}
- },
- files: {
- 'blog/archives/': ['archives/*.hbs']
}
}
}
@@ -408,8 +417,6 @@ options: {
}
```
-### Usage Examples
-
## Pretty URLs
Pretty links involve saving an `index.html` to each directory, with the tile, file name, slug, or some other variable as the `:basename` of the directory. For example:
@@ -569,7 +576,7 @@ Also see the [Gruntfile](./Gruntfile.js) for example usage.
### Avoid date-based permalinks
-Yep, that's what I said. There are plenty of valid use cases for using date-based URL's. This plugin offers a number of date-based patterns, and we leverage [Moment.js](http://momentjs.com/) a lot. Still, I recommend that you avoid using a date-based permalink structure for your blog or documentation, because there is a good chance it will do more harm than good over the long term.
+Yep, that's what I said. There are plenty of valid use cases for using date-based URL's. This plugin offers a number of date-based patterns, and we leverage [Moment.js](http://momentjs.com/ "Moment.js Permalinks") a lot. Still, I recommend that you avoid using a date-based permalink structure for your blog or documentation, because there is a good chance it will do more harm than good over the long term.
Date-based URL's tend to _decrease click through rates_ on older articles. Think about it, who prefers reading out of date content? So use a URL strategy that doesn't go out of its way to emphasize the date, and you'l keep your posts feeling like fresh content.
@@ -598,52 +605,75 @@ If you need to use a custom variable, such as `:author` or `:title`, just add it
```js
var _str = require('underscore.string');
-assemble: {
- options: {
- permalinks: {
- structure: ':author:ext',
- patterns: [
- {
- pattern: ':author',
- replacement: '<%= _str.slugify(pkg.author.name) %>'
- }
- ]
- }
- },
- files: {},
-...
+{
+ assemble: {
+ options: {
+ permalinks: {
+ structure: ':author:ext',
+ patterns: [
+ {
+ pattern: ':author',
+ replacement: '<%= _str.slugify(pkg.author.name) %>'
+ }
+ ]
+ }
+ },
+ files: {},
+ }
+}
```
-## Contributing
+## About
+
+### Related projects
-Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/assemble/assemble-grunt-middleware-issues/new).
+* [grunt-assemble-anchors](https://www.npmjs.com/package/grunt-assemble-anchors): Assemble plugin for creating anchor tags from headings in generated html using Cheerio.js. | [homepage](https://github.com/assemble/grunt-assemble-anchors#readme "Assemble plugin for creating anchor tags from headings in generated html using Cheerio.js.")
+* [grunt-assemble-contextual](https://www.npmjs.com/package/grunt-assemble-contextual): Generates a JSON file with the context of each page. Basic plugin to help see… [more](https://github.com/assemble/grunt-assemble-contextual) | [homepage](https://github.com/assemble/grunt-assemble-contextual "Generates a JSON file with the context of each page. Basic plugin to help see what's happening in the build.")
+* [grunt-assemble-decompress](https://www.npmjs.com/package/grunt-assemble-decompress): Assemble plugin for extracting zip, tar and tar.gz archives. | [homepage](https://github.com/assemble/grunt-assemble-decompress "Assemble plugin for extracting zip, tar and tar.gz archives.")
+* [grunt-assemble-download](https://www.npmjs.com/package/grunt-assemble-download): Assemble plugin for downloading files from GitHub. | [homepage](https://github.com/assemble/grunt-assemble-download "Assemble plugin for downloading files from GitHub.")
+* [grunt-assemble-i18n](https://www.npmjs.com/package/grunt-assemble-i18n): Plugin for adding i18n support to Assemble projects. | [homepage](https://github.com/assemble/grunt-assemble-i18n "Plugin for adding i18n support to Assemble projects.")
+* [grunt-assemble-lunr](https://www.npmjs.com/package/grunt-assemble-lunr): Assemble plugin for adding search capabilities to your static site, with lunr.js. | [homepage](http://assemble.io "Assemble plugin for adding search capabilities to your static site, with lunr.js.")
+* [grunt-assemble-navigation](https://www.npmjs.com/package/grunt-assemble-navigation): Assemble navigation plugin. Automatically generate Bootstrap-style, multi-level side nav. See the sidenav on assemble.io for… [more](https://github.com/assemble/grunt-assemble-navigation) | [homepage](https://github.com/assemble/grunt-assemble-navigation "Assemble navigation plugin. Automatically generate Bootstrap-style, multi-level side nav. See the sidenav on assemble.io for a demonstration.")
+* [grunt-assemble-permalinks](https://www.npmjs.com/package/grunt-assemble-permalinks): Permalinks plugin for Assemble, the static site generator for Grunt.js, Yeoman and Node.js. This plugin… [more](https://github.com/assemble/grunt-assemble-permalinks) | [homepage](https://github.com/assemble/grunt-assemble-permalinks "Permalinks plugin for Assemble, the static site generator for Grunt.js, Yeoman and Node.js. This plugin enables powerful and configurable URI patterns, [Moment.js](http://momentjs.com/) for parsing dates, much more.")
+* [grunt-assemble-sitemap](https://www.npmjs.com/package/grunt-assemble-sitemap): Sitemap plugin for Assemble | [homepage](http://assemble.io/plugins "Sitemap plugin for Assemble")
+* [grunt-assemble-toc](https://www.npmjs.com/package/grunt-assemble-toc): Assemble middleware for adding a Table of Contents (TOC) to any HTML page. | [homepage](http://assemble.io "Assemble middleware for adding a Table of Contents (TOC) to any HTML page.")
+* [grunt-assemble-wordcount](https://www.npmjs.com/package/grunt-assemble-wordcount): Assemble plugin for displaying wordcount and average reading time to blog posts or pages. | [homepage](https://github.com/assemble/grunt-assemble-wordcount "Assemble plugin for displaying wordcount and average reading time to blog posts or pages.")
+* [grunt-assemble](https://www.npmjs.com/package/grunt-assemble): Static site generator for Grunt.js, Yeoman and Node.js. Used by Zurb Foundation, Zurb Ink, H5BP/Effeckt… [more](http://assemble.io) | [homepage](http://assemble.io "Static site generator for Grunt.js, Yeoman and Node.js. Used by Zurb Foundation, Zurb Ink, H5BP/Effeckt, Less.js / lesscss.org, Topcoat, Web Experience Toolkit, and hundreds of other projects to build sites, themes, components, documentation, blogs and gh")
-## Other grunt-assemble plugins
+### Contributing
-* [grunt-assemble](https://www.npmjs.com/package/grunt-assemble): Static site generator for Grunt.js, Yeoman and Node.js. Used by Zurb Foundation, Zurb Ink, H5BP/Effeckt,… [more](https://www.npmjs.com/package/grunt-assemble) | [homepage](http://assemble.io)
-* [grunt-assemble-anchors](https://www.npmjs.com/package/grunt-assemble-anchors): Assemble plugin for creating anchor tags from headings in generated html using Cheerio.js. | [homepage](https://github.com/assemble/grunt-assemble-anchors)
-* [grunt-assemble-contextual](https://www.npmjs.com/package/grunt-assemble-contextual): Generates a JSON file with the context of each page. Basic plugin to help see… [more](https://www.npmjs.com/package/grunt-assemble-contextual) | [homepage](https://github.com/assemble/grunt-assemble-contextual)
-* [grunt-assemble-decompress](https://www.npmjs.com/package/grunt-assemble-decompress): Assemble plugin for extracting zip, tar and tar.gz archives. | [homepage](https://github.com/assemble/grunt-assemble-decompress)
-* [grunt-assemble-download](https://www.npmjs.com/package/grunt-assemble-download): Assemble plugin for downloading files from GitHub. | [homepage](https://github.com/assemble/grunt-assemble-download)
-* [grunt-assemble-i18n](https://www.npmjs.com/package/grunt-assemble-i18n): Plugin for adding i18n support to Assemble projects. | [homepage](https://github.com/assemble/grunt-assemble-i18n)
-* [grunt-assemble-lunr](https://www.npmjs.com/package/grunt-assemble-lunr): Assemble plugin for adding search capabilities to your static site, with lunr.js. | [homepage](http://assemble.io)
-* [grunt-assemble-navigation](https://www.npmjs.com/package/grunt-assemble-navigation): Assemble navigation plugin. Automatically generate Bootstrap-style, multi-level side nav. See the sidenav on assemble.io for… [more](https://www.npmjs.com/package/grunt-assemble-navigation) | [homepage](https://github.com/assemble/grunt-assemble-navigation)
-* [grunt-assemble-sitemap](https://www.npmjs.com/package/grunt-assemble-sitemap): Sitemap plugin for Assemble | [homepage](http://assemble.io/plugins)
-* [grunt-assemble-toc](https://www.npmjs.com/package/grunt-assemble-toc): Assemble middleware for adding a Table of Contents (TOC) to any HTML page. | [homepage](http://assemble.io)
-* [grunt-assemble-wordcount](https://www.npmjs.com/package/grunt-assemble-wordcount): Assemble plugin for displaying wordcount and average reading time to blog posts or pages. | [homepage](https://github.com/assemble/grunt-assemble-wordcount)
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+### Building docs
+
+_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
+
+To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
+
+```sh
+$ npm install -g verb verb-generate-readme && verb
+```
+
+### Running tests
+
+Install dev dependencies:
+
+```sh
+$ npm install -d && npm test
+```
-## Authors
+### Author
**Jon Schlinkert**
-+ [github/jonschlinkert](https://github.com/jonschlinkert)
-+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+* [github/jonschlinkert](https://github.com/jonschlinkert)
+* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
-## License
+### License
-Copyright © 2015 Jon Schlinkert
-Released under the MIT license.
+Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT license](https://github.com/assemble/grunt-assemble-permalinks/blob/master/LICENSE).
***
-_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on September 25, 2015._
+_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on July 19, 2016._
View
@@ -5,15 +5,17 @@
Permalinks are **appended to the dest directory**. So given this config:
```js
-assemble: {
- blog: {
- options: {
- permalinks: {
- structure: ':year/:month/:day/:basename:ext'
+{
+ assemble: {
+ blog: {
+ options: {
+ permalinks: {
+ structure: ':year/:month/:day/:basename:ext'
+ }
+ },
+ files: {
+ 'blog/archives/': ['archives/*.hbs']
}
- },
- files: {
- 'blog/archives/': ['archives/*.hbs']
}
}
}
View
@@ -33,20 +33,22 @@ If you need to use a custom variable, such as `:author` or `:title`, just add it
```js
var _str = require('underscore.string');
-assemble: {
- options: {
- permalinks: {
- structure: ':author:ext',
- patterns: [
- {
- pattern: ':author',
- replacement: '<%= _str.slugify(pkg.author.name) %>'
- }
- ]
- }
- },
- files: {},
-...
+{
+ assemble: {
+ options: {
+ permalinks: {
+ structure: ':author:ext',
+ patterns: [
+ {
+ pattern: ':author',
+ replacement: '<%= _str.slugify(pkg.author.name) %>'
+ }
+ ]
+ }
+ },
+ files: {},
+ }
+}
```
-[moment]: http://momentjs.com/ "Moment.js Permalinks"
+[moment]: http://momentjs.com/ "Moment.js Permalinks"

0 comments on commit ae5a62b

Please sign in to comment.