{"id":13555989,"url":"https://github.com/jaredhanson/kerouac","last_synced_at":"2025-05-13T01:51:08.680Z","repository":{"id":5441675,"uuid":"6634616","full_name":"jaredhanson/kerouac","owner":"jaredhanson","description":"Poetic static site generator for Node.js.","archived":false,"fork":false,"pushed_at":"2024-06-19T16:49:41.000Z","size":366,"stargazers_count":82,"open_issues_count":4,"forks_count":9,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-14T07:18:05.119Z","etag":null,"topics":["kerouac","nodejs","ssg","static-site-generator"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaredhanson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-11-11T02:04:18.000Z","updated_at":"2024-06-19T16:49:44.000Z","dependencies_parsed_at":"2023-12-13T01:45:05.718Z","dependency_job_id":"2556ffc5-c23a-415d-afee-9d13b538fd8a","html_url":"https://github.com/jaredhanson/kerouac","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fkerouac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fkerouac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fkerouac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredhanson%2Fkerouac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaredhanson","download_url":"https://codeload.github.com/jaredhanson/kerouac/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253856616,"owners_count":21974576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kerouac","nodejs","ssg","static-site-generator"],"created_at":"2024-08-01T12:03:32.924Z","updated_at":"2025-05-13T01:51:08.663Z","avatar_url":"https://github.com/jaredhanson.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","nodejs"],"sub_categories":[],"readme":"# Kerouac\n\n[![Version](https://img.shields.io/npm/v/kerouac.svg?label=version)](https://www.npmjs.com/package/kerouac)\n[![Build](https://img.shields.io/travis/jaredhanson/kerouac.svg)](https://travis-ci.org/jaredhanson/kerouac)\n[![Quality](https://img.shields.io/codeclimate/github/jaredhanson/kerouac.svg?label=quality)](https://codeclimate.com/github/jaredhanson/kerouac)\n[![Coverage](https://img.shields.io/coveralls/jaredhanson/kerouac.svg)](https://coveralls.io/r/jaredhanson/kerouac)\n[![Dependencies](https://img.shields.io/david/jaredhanson/kerouac.svg)](https://david-dm.org/jaredhanson/kerouac)\n\n\n\u003e I saw that my life was a vast glowing empty page and I could do anything I\n\u003e wanted.\n\u003e\n\u003e -- Jack Kerouac\n\nKerouac is a static site generator written in [Node.js](http://nodejs.org/).  It\nis the simplest possible tool for transforming content written using lightweight\nmarkup, such as [Markdown](http://daringfireball.net/projects/markdown/), into a\ncomplete website.\n\nFor highly-customized sites, Kerouac is also a powerful framework inspired by [Express](http://expressjs.com/).\nEach page in the generated website is declared as a route, which can take\nadvantage of middleware purpose-built for static pages.  Never before has\nbeen building a hybrid static and dynamic site been so consistent.\n\n## Install\n\n    $ npm install kerouac\n\n## Usage\n\n    var kerouac = require('kerouac');\n    var site = kerouac();\n\n    site.set('base url', 'http://www.example.com/');\n    site.content('content');\n    site.assets('public');\n    \n    site.generate(function(err) {\n      if (err) {\n        console.error(err.message);\n        console.error(err.stack);\n        return;\n      }\n    });\n\n#### Content,  Layouts, and Assets\n\nA typical static site consists of a content written in [Markdown](http://daringfireball.net/projects/markdown/),\nand layouts which structure the content into an HTML page.\n\nKerouac will render all content within a directory:\n\n    site.content('content');\n\nContent contains a section known as \"front matter\" surrounded by three dashes\n(`---`).  Front matter specifies metadata about the content, including which\nlayout should be used when generating a web page.\n\n    ---\n    layout: 'main'\n    title: 'Welcome'\n    ---\n\n    # Hello\n\n    Welcome to my website!\n\nLayouts are located in a `layouts` directory and are rendered using [EJS](https://github.com/visionmedia/ejs).\n\n    \u003c!DOCTYPE html\u003e\n    \u003chtml\u003e\n      \u003chead\u003e\n        \u003cmeta charset=\"utf-8\" /\u003e\n        \u003ctitle\u003e\u003c%- title -%\u003e\u003c/title\u003e\n      \u003c/head\u003e\n      \u003cbody\u003e\n        \u003c%- content -%\u003e\n      \u003c/body\u003e\n    \u003c/html\u003e\n\nMost web sites also contain assets including images, stylesheets, and scripts\nthat don't need preprocessing.  Kerouac will copy all assets in a given\ndirectory when generating the site:\n\n    site.assets('public');\n\nNote that markup and layout rendering is fully customizable.  Alternatives,\nsuch as [Textile](http://en.wikipedia.org/wiki/Textile_%28markup_language%29)\nand [Jade](http://jade-lang.com/), can be used to suit your preferences.\n\n#### Plugins\n\nMany websites contain sections, such as a sitemap or blog, which conform to an\nestablished set of conventions.  Kerouac supports plugins, which can be used to\nbundle up these sections into modules that can be reused accross multiple sites.\n\nFor example, to generate a sitemap for your site, simply add the [kerouac-sitemap](https://github.com/jaredhanson/kerouac-sitemap)\nplugin:\n\n    site.plug(require('kerouac-sitemap')());\n\nA [list](https://github.com/jaredhanson/kerouac/wiki/Plugins) of plugins\ndeveloped by the community is available on the [wiki](https://github.com/jaredhanson/kerouac/wiki).\n\n#### Middleware\n\nJust like [Express](http://expressjs.com/) and [Connect](http://www.senchalabs.org/connect/),\nKerouac allows pages to be generated using middleware at both the whole-site and\nper-page level.  This is the lowest-level API, and content, assets, and plugins\n(as detailed above) are built upon this foundation.\n\nThe majority of sites will never need to operate at this level.  If needed, the\nAPI is simple.\n\n    // whole-site middleware\n    site.use(function(page, next) {\n      console.log('generating ' + page.path);\n      next();\n    });\n    \n    // page-level middleware\n    site.page('/hello.txt', function(page, next) {\n      page.write('Hello!');\n      page.end();\n    });\n\nA [list](https://github.com/jaredhanson/kerouac/wiki/Middleware) of middleware\ndeveloped by the community is available on the [wiki](https://github.com/jaredhanson/kerouac/wiki).\n\n## Examples\n\nThe following sites are built with Kerouac, and have public code repositories\nthat illustrate how to develop using Kerouac's API.\n\n- [Locomotive](http://locomotivejs.org/) — ([source](https://github.com/jaredhanson/www.locomotivejs.org))\n- [Passport](http://passportjs.org/) — ([source](https://github.com/jaredhanson/www.passportjs.org))\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2012-2017 Jared Hanson \u003c[http://jaredhanson.net/](http://jaredhanson.net/)\u003e\n\n\u003ca target='_blank' rel='nofollow' href='https://app.codesponsor.io/link/vK9dyjRnnWsMzzJTQ57fRJpH/jaredhanson/kerouac'\u003e  \u003cimg alt='Sponsor' width='888' height='68' src='https://app.codesponsor.io/embed/vK9dyjRnnWsMzzJTQ57fRJpH/jaredhanson/kerouac.svg' /\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredhanson%2Fkerouac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredhanson%2Fkerouac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredhanson%2Fkerouac/lists"}