Giter Site home page Giter Site logo

docpad-plugin-cleanurls's Issues

Publish new release

Was wondering if someone could create a new release of master branch and publish to npm. Thanks in advance :)

TypeError: Object -3 has no method 'bind'

I've been getting this error inside cleanurls. I have no idea why. The key with a value of 3 is _curOpen.

error: Something went wrong with the action
error: An error occured:
TypeError: Object -3 has no method 'bind'
    at Object.<anonymous> (/Users/Thoughtworker/repos/opensource/zurb-foundation.docpad/node_modules/docpad-plugin-cleanurls/node_modules/safefs/out/lib/safefs.js:119:27)
    at Object.<anonymous> (/Users/Thoughtworker/repos/opensource/zurb-foundation.docpad/node_modules/docpad-plugin-cleanurls/node_modules/safefs/out/lib/safefs.js:125:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (/Users/Thoughtworker/repos/opensource/zurb-foundation.docpad/node_modules/docpad-plugin-eco/node_modules/eco/node_modules/coffee-script/lib/coffee-script/coffee-script.js:211:36)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at CleanUrlsPlugin.writeAfter (/Users/Thoughtworker/repos/opensource/zurb-foundation.docpad/node_modules/docpad-plugin-cleanurls/out/cleanurls.plugin.js:66:18)
    at ambi (/Users/Thoughtworker/repos/opensource/zurb-foundation.docpad/node_modules/docpad/node_modules/ambi/out/lib/ambi.js:23:18)
    at Task.<anonymous> (/Users/Thoughtworker/repos/opensource/zurb-foundation.docpad/node_modules/docpad/node_modules/event-emitter-grouped/out/lib/event-emitter-grouped.js:38:23)
    at ambi (/Users/Thoughtworker/repos/opensource/zurb-foundation.docpad/node_modules/docpad/node_modules/ambi/out/lib/ambi.js:23:18)
    at fire (/Users/Thoughtworker/repos/opensource/zurb-foundation.docpad/node_modules/docpad/node_modules/taskgroup/out/lib/taskgroup.js:159:23)
    at b (domain.js:183:18)
    at Domain.run (domain.js:123:23)
    at Task.fire (/Users/Thoughtworker/repos/opensource/zurb-foundation.docpad/node_modules/docpad/node_modules/taskgroup/out/lib/taskgroup.js:166:25)
    at processImmediate [as _immediateCallback] (timers.js:330:15)

Generate custom url output within coffee configuration

Is it possible to output site pages inside a directory with the "page name" and an "index.html" file inside? This would provide a clean url with a "/" ending in the url address.

Python's Pelican static site generator uses a config file to specify this function simply like so:
PAGE_SAVE_AS = '{slug}/index.html'

{slug} would be the page name used in the markdown file.

Thanks

Not compatible with docpad-plugin-paged

Not compatible with docpad-plugin-paged

Just an FYI, paged plugin uses the base file name and extension to generate paginated pages. I'll look into fixing one or the other.

Remove numerics from file name in the URL

Say I have 01-index.html, 02-getting-started.html and so on. Is there was to have clean urls emit urls like /index and /getting-started instead of /01-index and /02-getting-started ?

I can remove the numeric from file and have the order in metadata instead which will avoid this issue. But having them on the file makes it easier to glean info about which file goes first and so on.

Maybe its possible via advancedRedirect rules? Or maybe there is an even simpler way?

For the static environment output redirect documents

When inside the static environment we should:

  1. Set the outPath to the primary url physical location
  2. Set redirect documents to all the secondary urls physical locations

Currently with v2.3 with static environments we don't take custom urls into account at all.

hard-coded static env name

line 80 in your src plugin code there is :

Static

if 'static' in docpad.getEnvironments()

the static features could also be triggered by a custom parameters to not enforce static env name use. It could improve compatibility with other plugin using env specific rules.

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.