Giter Site home page Giter Site logo

docpad-plugin-cleanurls's Introduction

Clean URLs Plugin for DocPad

Build Status NPM version Flattr donate button PayPayl donate button

Adds support for clean URLs to DocPad

Install

npm install --save docpad-plugin-cleanurls

Usage/Configure

For non-static environments we will set the document's url to it's clean url. This means that our document is still outputted to the same place on the file system as the clean url stuff is handled by the web server instead. This is the default.

For static environments we will set the document's outPath to that of a directory with a index.html file (e.g. pages/welcome.html will be outputted to pages/welcome/index.html). You can tell docpad to use the static environment by adding --env static to the end of your DocPad command, so to perform a one off generation for a static environment you'll run docpad generate --env static, to perform your usual generate, serve and watch it'll be docpad run --env static.

If you'd like to disable the static mode when working in the static environment you can add the following to your docpad configuration file.

environments:
	static:
		plugins:
			cleanurls:
				enabled: false

trailingSlashes

Enable to generate document.urls like '/beep/' instead of /beep. Defaults to false.

History

You can discover the history inside the History.md file

Contributing

You can discover the contributing instructions inside the Contributing.md file

License

Licensed under the incredibly permissive MIT License
Copyright © 2012+ Bevry Pty Ltd
Copyright © 2011 Benjamin Lupton

docpad-plugin-cleanurls's People

Contributors

balupton avatar hurrymaplelad avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.