docpad

Need explanation for Docpad persistence

自古美人都是妖i 提交于 2019-12-21 17:29:04
问题 I am pretty confused with the architecture behind how data is persisted in Docpad. From blogs and forums, I got to know in-memory (and/or out directory) is used for generated contents. But one of the selling points of Docpad is "completely file based". From the sound of it, hosting it on Heroku or any ephemeral file system doesn't seem logical. Can anyone give some explanation/clarification? 回答1: DocPad is pitched as a next generation web architecture. This mindmap showcases why we call it

Show only partial blog post in Docpad, with “Read More” link

*爱你&永不变心* 提交于 2019-12-19 03:58:55
问题 I need show only partial blog post... with a "Read more" link to full blog post. HOME: List last 5 partial/intro posts with Read More. This is possible in Docpad? Thanks.. 回答1: May by getCuttedContent: (content) -> i = content.search('<!-- Read more -->') if i >= 0 content[0..i-1] else content hasReadMore: (content) -> content.search('<!-- Read more -->') >= 0 more and <% posts = @getCollection('posts') %> <% for i in [@document.page.startIdx...@document.page.endIdx]: %> <% document = posts

Is there an efficient way in docpad to keep static and to-be-rendered files in the same directory?

懵懂的女人 提交于 2019-12-13 16:26:16
问题 I am rebuilding a site with docpad and it's very liberating to form a folders structure that makes sense with my workflow of content-creation, but I'm running into a problem with docpad's hard-division of content-to-be-rendered vs 'static'-content. Docpad recommends that you put things like images in /files instead of /documents, and the documentation makes it sound as if otherwise there will be some processing overhead incurred. First, I'd like an explanation if anyone has it of why a file

What methods can be called on Docpad's Query tools?

拜拜、爱过 提交于 2019-12-12 02:58:16
问题 In Docpad's documentation it lists a series of Querying helpers. Here's the link. The following list appears at the bottom. Among these helpers are @getCollection, @getFiles, @getFilesAtPath, etc. But there is no indication anywhere that I have been able to locate about what kind of objects are returned by these helpers, and what sort of methods can be called on them, how does one retrieve data, etc? There are a few examples in the Docpad documentation, for example the beginner's guide shows

docpad subdirectory rendered into general directory

风格不统一 提交于 2019-12-11 13:13:09
问题 How to move files from src/documents/posts/post1.html to out/post1.html without the subfolder posts appearing in the out directory? I have a sub directory posts in my documents src/ documents/ index.html contact.html posts/ post1.html post2.html And I want the posts to be in out/post1.html not out/posts/post1.html . 回答1: Turns out you can set the relativePath property to whatever you want @getCollection("html").findAllLive(..).on 'add', (document) -> newRelativePath = document.get(

Skeleton list isn't available with DocPad run command

微笑、不失礼 提交于 2019-12-11 05:05:41
问题 When I use the command d:\path>docpad run , I have only one choice with Skeleton because I get an error when DocPad tried to updating exchange. The output of this command: D:\path>docpad run info: Welcome to DocPad v6.69.1 (global installation: C:\Users\v20100v\AppData\Roaming\npm\node_modules\docpad) notice: If everyone who saw this message donated $1/week, maintaining DocPad would become sustainable: http://docpad.org/donate info: Contribute: http://docpad.org/docs/contribute info: Plugins:

how can i exclude files to being regenerated by docpad?

懵懂的女人 提交于 2019-12-10 11:36:13
问题 I'm working in a new skeleton for docpad using zurb's foundation 4. you can check it out the progress here: https://github.com/dospuntocero/zurb-foundation.docpad but every time i do a small change on the files it takes 8-12 seconds to regenerate files and it regenerate 47 files... no idea which ones (im just modifying one) info: Generating... info: Generated 47 files in 11.013 seconds info: Regenerated at 22:15:08 info: Regenerating at 22:16:59 info: Generating... info: Generated 47 files in

Azure Website Instance not running defined Node Version in Package.json

依然范特西╮ 提交于 2019-12-08 07:37:43
问题 Currently in Azure I am utilizing a 'Azure Website' instance to try and run Docpad (NodeJS App). Within my package.json file I have the following defined.. "engines": { "node": "0.10.21", "npm": "1.x" }, I have tried numerous different entries, from 0.10.x to 0.8.x all listed here => http://azure.microsoft.com/en-us/documentation/articles/nodejs-specify-node-version-azure-apps/ The problem is that Docpad is using Dependencies with Semver Entries and Azure seems to be ignoring my defined Node

how can i exclude files to being regenerated by docpad?

ぐ巨炮叔叔 提交于 2019-12-07 05:36:27
I'm working in a new skeleton for docpad using zurb's foundation 4. you can check it out the progress here: https://github.com/dospuntocero/zurb-foundation.docpad but every time i do a small change on the files it takes 8-12 seconds to regenerate files and it regenerate 47 files... no idea which ones (im just modifying one) info: Generating... info: Generated 47 files in 11.013 seconds info: Regenerated at 22:15:08 info: Regenerating at 22:16:59 info: Generating... info: Generated 47 files in 9.551 seconds info: Regenerated at 22:17:09 info: Regenerating at 22:22:48 so it's kind of super slow,

How to auto-generate html from jade file when only included markdown file has changed in livereload development environment?

大兔子大兔子 提交于 2019-12-06 17:04:24
问题 So I've got a file like this: # index.html.jade p Test include content.md So if I change the content of content.md out/index.html is not regenerated (because the index.html.jade file itself of course has not changed). (I am using livereload - in the HTML 5 Boilerplate docpad template - and the so the browser does not refresh on a valid change :-( ) On the other hand the final out/index.html file of the previous and current version (after the content.md change) are different (most likely on