docpad-plugin-urlnorm
DocPad plugin that normalizes urls
Last updated 6 years ago by emppu .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install docpad-plugin-urlnorm 
SYNC missed versions from official npm registry.

docpad-plugin-urlnorm

** Not ready for release **

URL normalizer for DocPad

  1. Rename your output files to normalized names. You can still serve with static servers such as nginx or apache.
  2. Change all tags in .html output accordingly.

Have a freedom to name your raw files as you want. You have consistent urls and no need to remember puncuations.

Example

src/documents/Fruit/Red Apple.html
Original  : http://www.example.com/Fruit/Red%20Apple.html
Normalized: http://www.example.com/fruit/red-apple.html

Options

This is the default setting.

plugins:
	urlnorm:
		enable: true

		documentPath: ['/']
		assetPath: ['/']       # you can normalize even asset and layout files
		layoutPath: ['/']

		normalizeDirs: true
		capitalizeDirs: true  # aaa/bBb/cCc.html -> Aaa/Bbb/cCc.html. Used when normalizeDirs == true
		normalizeFiles: true
		capitalizeFiles: false # aaa/bBb/cCc.html -> aaa/bBb/Ccc.html. Used when normalizeDirs == true

		mapping:
			' ':'-',           # ' ':'' to just remove spaces
			'/':null           # use null to throw error to prevent silent failures

		normalizeLinks: true   # <a href='Projects'> -> <a href='projects'>
		errorOnConflicts: true # 'A B C.html.md' vs 'a-b-c.html.eco'

TODO

  • Normalize assets and layouts

Current Tags

  • 2.0.3                                ...           latest (6 years ago)

3 Versions

  • 2.0.3                                ...           6 years ago
  • 2.0.2                                ...           6 years ago
  • 2.0.1                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |