-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
watch only for relevant files, some doc
- Loading branch information
Showing
22 changed files
with
187 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// trofaf is a super-simple *live* static blog engine. | ||
// | ||
// Install using: `go get github.com/PuerkitoBio/trofaf` | ||
// | ||
// ## Description | ||
// | ||
// It generates a static website from *markdown* files and front matter, and requires only a simple | ||
// 3-directories structure to get going. It favors simplicity over features. | ||
// | ||
// To get started, create the 3 subdirectories (you can look at the `example/` subdirectory | ||
// for... an example): | ||
// * posts | ||
// * public | ||
// * templates | ||
// | ||
// trofaf only cares about `*.md` files in the posts directory, and about `*.amber` (Amber templates) | ||
// or `*.html` (native Go templates) files in the templates directory. It will watch for changes, | ||
// creates or deletes on those files in these directories, and will re-generate automatically | ||
// the website when required. This is the *live* part. | ||
// | ||
// All files in the public directory are exposed by the web server. Posts in markdown format get | ||
// translated to static html files at the root of the public directory. The html file name is | ||
// an URL-friendly slug generated from the original markdown file name. There is no extension, so | ||
// the URL looks clean and, uh, *modern*? | ||
// | ||
// An RSS feed is automatically generated from a number of recent posts, and saved as a static | ||
// XML file in the public directory. | ||
// | ||
// There is no special template for an index page, the most recent post (based on the publication | ||
// date found in the front matter of the markdown files) is saved twice - once under its own | ||
// html file, once under the index.html file, so that this is the page displayed when the root | ||
// of the web server is requested. | ||
// | ||
// When the site is (re-)generated, the public directory must be cleaned, because some posts may | ||
// have been deleted. Subdirectories are left untouched (so that `css/` or `js/` directories can | ||
// coexist peacefully), as well as hidden (dot) files, and some special files are also graced | ||
// from the destruction (robots.txt, favicon.ico, etc., see gen.go). | ||
// | ||
// ## Command-line Options | ||
// | ||
// The following options can be set at the command-line: | ||
// * Port (-p) : the port number for the web server, defaults to 9000. | ||
// * NoGen (-G) : prevents watching and live-generating the site. This is equivalent to running the static public directory. | ||
// * SiteName (-n) : the name of the web site, passed to the template. | ||
// * TagLine (-t) : a tag line for the web site, passed to the template. | ||
// * RecentPostsCount (-r) : the number of posts in the recent posts list, passed to the template and used for the RSS feed. | ||
// * BaseURL (-b) : the base URL of the web site, most likely the host name (i.e. http://www.mysite.com). | ||
package main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test2! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<rss version="2.0"><channel><title></title><description></description><link></link><lastBuildDate>14 Jul 13 19:43 -0400</lastBuildDate><generator>trofaf</generator><item><title>Ce blogue a déménagé sur GitHub</title><link>/010-demenagement</link><description>Suite à l'annonce de la fermeture de Calepin.co, j'ai déménagé ce blogue sur http://hypermegatop.github.com. Veuillez mettre à jour vos favoris!</description><author>Martin Angers</author><category></category><pubDate>30 Apr 12 00:00 +0000</pubDate></item><item><title>Je suis venu te dire que je m'en vais</title><link>/009-je-men-vais</link><description>Ou plutôt, "je suis venu te dire qu'on m'évince", mais ça "punch" moins... En effet, mon coup de foudre pour le blogiciel Calepin aura finalement été son baiser de la mort. Sur Twitter la semaine dernière, via le canal officiel du site, on apprenait que c'était la fin des haricots.</description><author>Martin Angers</author><category></category><pubDate>23 Apr 12 00:00 +0000</pubDate></item><item><title>Propriétés calculées avec Backbone</title><link>/008-backbone-computed-properties</link><description>La beauté de l'univers du code libre est que lorsqu'il manque une fonctionnalité, on peut se retrousser les manches, ouvrir le code et l'ajouter. Voici ma petite histoire des propriétés calculées avec Backbone.</description><author>Martin Angers</author><category></category><pubDate>13 Apr 12 00:00 +0000</pubDate></item><item><title>implement.js: typage fort et Javascript</title><link>/007-implement-js</link><description>L'injection de dépendance avec Javascript a comme conséquence de ne pouvoir assumer que les fonctionnalités offertes par l'instance reçue seront celles attendues.</description><author>Martin Angers</author><category></category><pubDate>02 Apr 12 00:00 +0000</pubDate></item><item><title>Expérimentations sur l'injection de dépendance avec node.js</title><link>/006-dependency-injection</link><description>L'injection de dépendance permet de découpler les différentes composantes d'une application pour en faciliter l'entretien, la testabilité, circonscrire l'impact des changements, mais aussi pour imposer une façon d'aborder la création de l'application en une aggrégation de pièces simples, à la responsabilité ciblée, et à l'API bien défini.</description><author>Martin Angers</author><category></category><pubDate>27 Mar 12 00:00 +0000</pubDate></item></channel></rss> | ||
<rss version="2.0"><channel><title>Ø value</title><description>a wysiwyg hypertext cybersite</description><link>http://localhost</link><lastBuildDate>14 Jul 13 20:36 -0400</lastBuildDate><generator>trofaf</generator><item><title>Ce blogue a déménagé sur GitHub</title><link>http://localhost/010-demenagement</link><description>Suite à l'annonce de la fermeture de Calepin.co, j'ai déménagé ce blogue sur http://hypermegatop.github.com. Veuillez mettre à jour vos favoris!</description><author>Martin Angers</author><category></category><pubDate>30 Apr 12 00:00 +0000</pubDate></item><item><title>Je suis venu te dire que je m'en vais</title><link>http://localhost/009-je-men-vais</link><description>Ou plutôt, "je suis venu te dire qu'on m'évince", mais ça "punch" moins... En effet, mon coup de foudre pour le blogiciel Calepin aura finalement été son baiser de la mort. Sur Twitter la semaine dernière, via le canal officiel du site, on apprenait que c'était la fin des haricots.</description><author>Martin Angers</author><category></category><pubDate>23 Apr 12 00:00 +0000</pubDate></item><item><title>Propriétés calculées avec Backbone</title><link>http://localhost/008-backbone-computed-properties</link><description>La beauté de l'univers du code libre est que lorsqu'il manque une fonctionnalité, on peut se retrousser les manches, ouvrir le code et l'ajouter. Voici ma petite histoire des propriétés calculées avec Backbone.</description><author>Martin Angers</author><category></category><pubDate>13 Apr 12 00:00 +0000</pubDate></item><item><title>implement.js: typage fort et Javascript</title><link>http://localhost/007-implement-js</link><description>L'injection de dépendance avec Javascript a comme conséquence de ne pouvoir assumer que les fonctionnalités offertes par l'instance reçue seront celles attendues.</description><author>Martin Angers</author><category></category><pubDate>02 Apr 12 00:00 +0000</pubDate></item><item><title>Expérimentations sur l'injection de dépendance avec node.js</title><link>http://localhost/006-dependency-injection</link><description>L'injection de dépendance permet de découpler les différentes composantes d'une application pour en faciliter l'entretien, la testabilité, circonscrire l'impact des changements, mais aussi pour imposer une façon d'aborder la création de l'application en une aggrégation de pièces simples, à la responsabilité ciblée, et à l'API bien défini.</description><author>Martin Angers</author><category></category><pubDate>27 Mar 12 00:00 +0000</pubDate></item></channel></rss> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.