GithubHelp home page GithubHelp logo

wheat's Introduction

Wheat

Wheat is a blogging engine that reads a git repo full of markdown articles and presents them as a website.

How to Install

Either manually install all the dependencies or use npm. It's packaged nicely now.

npm install wheat

For on the fly rendering of Graphviz graphs (DOT files), Graphviz will need to be installed

That's it! Checkout the wheat branch of howtonode.org for an example of how to use the library.

http://github.com/creationix/howtonode.org

wheat's People

Contributors

acmarques avatar creationix avatar crypticswarm avatar isaacs avatar ppejovic avatar tootallnate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wheat's Issues

git-fs 0.0.7 breaks wheat

git-fs v0.0.7 breaks wheat. It appears to be coming from a change in the Git.readFile having an optional format. Currently when using git-fs v0.0.7 wheat will only spit out 404 pages.

Problem with Node 0.6?

I did npm install wheat, then I also installed the packages stack and creationix. When I run node server/server.js I got this

sanbor@sanbor:~/Projects/Playground/howtonode.org$ node server/server.js

node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead.
at Function. (module.js:376:11)
at Object. (/usr/local/lib/node_modules/wheat/lib/wheat.js:23:8)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
at Module.require (module.js:357:17)
at require (module.js:368:17)
at Object. (/home/sanbor/Projects/Playground/howtonode.org/server/server.js:8:3)
at Module._compile (module.js:432:26)

UTF-8 file name

Is it possible to make wheat route correctly when storing articles in files with utf-8 chars? Rendering of the index pages works, but routing (I guess at wheat/wheat.js) will fail with "404" not-found...

  • I don't mean the content, rather the actual file name for the article

    GET /%D7%98%D7%A1%D7%98 404 Content-Type=text/plain
    GET /%D7%98%D7%A1%D7%98 404 Content-Type=text/plain

Documentation?

Seriously, even a basic outline of the available features would be nice.

Issues with `v0.4.0` Node...

I seem to be having some problems with Wheat as of a couple days ago. I had it working on 0.4.0 for a few days and I'm not quite sure what changed exactly. Here's a breakdown of what's happening:

  1. I start the server. It work fine on the homepage.
  2. I click an article. It renders and works fine.
  3. Refreshing that first article works as well.
  4. Clicking on any other article will fail: Wheat goes through it's entire process, but a response containing only the String "undefined" is sent back to the client.
  5. Refreshing after that goes through a different stack trace (see below), but the same "undefined" response is sent back.
  6. Repeat steps 4 and 5 for any article thereafter.... Fail!

Here's a gist containing the stacks: https://gist.github.com/695c6b79a80a130b6254
first error is the stack from the first time an article is clicked and "undefined" is sent, or second error is the stack from every refresh after the first.

Hopefully you'll have some idea of what's going on here. Thanks in advance!

Simple tag/category support

I'm experimenting with static/git-backed blog engines, currently investigating Wheat by way of Jekyll. I like its minimalism and don't wish to compromise that beyond what is necessary, but I think that a few extra features might be added without doing so.

I'd like to tag posts with comma-delimited tags, then support URLs like "/tags/foo" for viewing posts with the specified tag.

I'd also like to have various connected sub-blogs hosted in the same repository, but with posts in different categories. For instance, mydomain.info/ would show all my posts, mydomain.info/podcasts would show all posts in the podcasts category, mydomain.info/podcasts/fiction would show a specific podcast from that specific subcategory...

I'm not sure what the best way to namespace these might be. Perhaps subdirectories in the articles/ directory? That would keep the various files and assets separate and make them easier to work with.

I'm also not immediately certain how Wheat blogs are configured, but perhaps a property could be set in app.js to denote the URL prefix for tags/categories if one is desired.

wrong version tags on http://howtonode.org/ 'other articles by this author'

Hi,

going to http://howtonode.org/ brings up the main page and in the articles section some of article links show version tags and some don't.

Now if you select an article without version tag (for example the control-flow article) the links in the 'other articles by this author' section don't show any version tags at all.

But if you go to an article with version tag (for example the most recent volcano-wheat article) all links in this section show the v0.1.91 version tag.

Image galleries?

Hi,

I'm evaluating using wheat for a project that is pretty heavy with image galleries. How does it deal with that issue? I guess my ideal would be something like:

  • I can have a "gallery" page type
  • I can have a gallery of galleries at the top of the structure
  • I can dump a bunch of images of whatever sizes into a folder in it
  • jekyll will take care of processing the images into thumbnails and full-size(s) according to some settings in a config file somewhere (probably downscaling only)
  • on my gallery html page, I add whatever image viewer I want and wheat will take care of converting the list of files to a JSON object that's consumed by the slideshow plugin
    • or, I can use some kind of template just to show the images or thumbnails statically on the page.

Is this possible/easy? If not are there any static site generators that are good at this?

RSS Support

Hi. I follow howtonode.org and it would be great if /feed can respond with a RSS layout and the lastest posts added.

low priority off course

Thanks!!!

Error in prettify.js - Cannot set property console of #<Object> which has only a getter

When I try to run howtonode.org (using spark in the directory that has app.js) after installing wheat 0.1.5 using npm (running node v0.4.0-pre), I get the following error

node.js:116
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: Cannot set property console of # which has only a getter
at Object. (/home/dev/local/lib/node/.npm/wheat/0.1.5/package/lib/wheat/prettify.js:62:20)
at Module._compile (module.js:302:26)
at Object..js (module.js:308:10)
at Module.load (module.js:234:31)
at Function._load (module.js:201:10)
at require (module.js:246:19)
at Object. (/home/dev/local/lib/node/.npm/wheat/0.1.5/package/lib/wheat/renderers.js:5:16)
at Module._compile (module.js:302:26)
at Object..js (module.js:308:10)
at Module.load (module.js:234:31)

The line it's referring to is

window.console = console;

Any ideas?

Node & NPM were installed using this method (and therefore live in ~/local) if it makes any difference - https://gist.github.com/579814#file_only_git_all_the_way.sh

no install.sh

according to the readme, i should execute install.sh after cloning the wheat repo.
but there is no install.sh

nightmarish install process

you should put a warning up on this library or fix it.

i encountered soo much fail when trying to get this running.

read file in UTF8

I can't write an article.markdown in utf8 (eg. german ä,ö,ü) because Git.readFile (git-fs.js: line 237) reads with 'binary' encoding.

Solution might be to pass in an optional parameter 'encoding'?

Installation is broken & dependencies are out of date

install.sh was removed (in commit 5f9dd7f).

Also, the dependency chain is out-of-date:

wheat depends on git, which depends on kiwi which has not been updated in a while (posix vs. fs, and still using promises).

I was trying to contribute a howtonode.org article and I find myself "yak shaving" ;-)

ENOENT error on both nodester and heroku

Missing packed-refs in both cases.
Wheat works on my local machine.
Did get it to work on ec2, after doing a git pack-refs.

heroku logs

2011-11-23T02:59:24+00:00 app[web.1]: /app/node_modules/wheat/lib/wheat.js:75
2011-11-23T02:59:24+00:00 app[web.1]: if (err) { throw err; }
2011-11-23T02:59:24+00:00 app[web.1]: ^
2011-11-23T02:59:24+00:00 app[web.1]: Error: ENOENT, No such file or directory '/app/packed-refs'

wheat breaks if there is a hidden file in the howtonode.org articles directory

Steps:

  1. checkout the howtonode.org repository
  2. create a hidden file in the howtonode.org/articles directory (eg howtonode.org/articles/.xyz)
  3. start wheat in the howtonode.org directory

Now point the browser to the url wheat is serving the files on.
The result is not the expected website but an error message:

Error: No such file or directory
at node.js:748:9

Used versions:

  • howtonode.org revision 1b741f6ac53
  • wheat revision 1a143a9
  • node.js version 0.1.91

Connect error

Got a Connect server validation error when starting wheat:

Error: Each layer must have a route and a handle function
    at Server.use (/home/garry/.node_libraries/wheat/connect/index.js:146:15)
    at Server.<anonymous> (/home/garry/.node_libraries/wheat/connect/index.js:102:14)
    at Array.forEach (native)
    at new Server (/home/garry/.node_libraries/wheat/connect/index.js:101:12)
    at Object.createServer (/home/garry/.node_libraries/wheat/connect/index.js:270:12)
    at Object.<anonymous> (/home/garry/bin/wheat:21:9)
    at Module._compile (module:384:23)
    at Module._loadScriptSync (module:393:8)
    at Module.loadSync (module:296:10)
    at Object.runMain (module:447:22)

TypeError: Cannot read property 'apply' of undefined

dan@entropy:$ wheat projects/howtonode.org/
Starting wheat server using git repo at projects/howtonode.org/
node-router server instance at http://127.0.0.1:8080/
127.0.0.1 - - [Fri, 16 Apr 2010 01:48:10 GMT] "GET / HTTP/1.1" 200 - "" "Mozilla/5.0"
TypeError: Cannot read property 'apply' of undefined
at ServerResponse.end (/home/dan/.node_libraries/wheat/node-router.js:54:5)
at Function.responder (/home/dan/.node_libraries/wheat.js:668:18)
at Function. (/home/dan/.node_libraries/wheat/git.js:91:23)
at next (/home/dan/.node_libraries/wheat/step.js:49:23)
at Function.buildHeaders (/home/dan/.node_libraries/wheat.js:475:11)
at next (/home/dan/.node_libraries/wheat/step.js:49:23)
at Step (/home/dan/.node_libraries/wheat/step.js:90:3)
at postProcess (/home/dan/.node_libraries/wheat.js:446:5)
at Function.callPostProcess (/home/dan/.node_libraries/wheat.js:513:11)
at Function.next (/home/dan/.node_libraries/wheat/step.js:49:23)
dan@entropy:
$

how to show all files' list

after posting thousand of articles, it's hard to find articles which not listed in the right column of first page.

Not compatible with Node 0.6.10

I cloned the howtonode repo, but couldn't get it to work properly with the Node.JS version that ships with Ubuntu 12.04 - 0.6.10 or so. The index page loaded, but an (arbitrary) article did not. The server log was empty, and the client eventually timed out.

I tried to debug wheat with node-inspector for a little while, but couldn't really pinpoint the problem.

Upgrading Node to 0.8.8 fixed the problem.

Articles randomly return "undefined" to browser

On our blog I've ran into this issue a few times. Wheat will sporadically return "undefined" to the browser instead of the appropriate article.

Refreshing the page will make the article load. Any ideas?

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.