docpad described being comparable other static site generators, described being "not limited static site generation".
i've been browsing docpad website , other documentation , haven't yet been able find seems explain how incorporate dynamic content, , types of limitations may involved?
as relative beginner, wondering if can me better understand methodology whereby dynamic content incorporated docpad...? e.g. ajax, , dynamic server-side scripts doing things dynamically loading pictures flickr webpage when tag clicked...
thanks.
so there's few ways docpad facilitates dynamic content:
via
regenerateevery
configuration option. regenerate website every specify. great when combined plugins feedr pulling in data remote feed sources (like latest social activity), repocloner clones out , keeps git repository date inside project. benefit of option it's easy , provides illusion of dynamic website. instance benjamin lupton website applies method keep it's statistics on home page, social data in sidebar date. every hour regenerates latest information. making fast, , illusively dynamic.via
dynamic
meta-data property. when set totrue
tells docpad server should re-render document on each request, rather once. works great inside kitchensink skeleton search pages , misc forms. way similar php development.via
serverextend
event. event allows hook , extend docpad server, allowing add server-side logic, handling, etc. common use cases add routing server handle route aliases, adding form processing such contact form, or add restulful interface backbone.js application. docpad website uses add routing , regenerate post-receive hook documentation. nodechat skeleton uses add socket.io server-side logic.via api. way involved can quite rewarding if wish docpad small part of existing node.js application. this, can create docpad instance in code , interact it. grunt-docs grunt task utilises :)
Comments
Post a Comment