Pushed to ArneBab/site
4223e08 survive 4.x templater API changes
hg site: static repositories ============================ Get it via `hg clone http://draketo.de/proj/hgsite/` With hg site you can say goodbye to vendor lock-in. Mission Statement ----------------- The goal of hg site is to enable convenient sharing of code over commodity servers which only offer FTP access and statically served files, while providing the same information as hg serve and full solutions like bitbucket, gitlab or notabug (naturally without the interactivity, but you can always clone the repo to interact). Installation ------------ * Clone this repo. `hg clone http://draketo.de/proj/hgsite/` * add this to the `[extensions]` section in your `~/.hgrc` `site = path/to/staticsite.py` if you have no such section, just add a line with content `[extensions]`. The extensions-section is below that line. Usage ----- Create and Upload your Site: `hg push [-f] --sitename "sitename" ftps://user:firstname.lastname@example.org/path/to/dir` To make this more convenient, add the following path and alias to your .hg/hgrc: [paths] ftp = ftps://user:email@example.com/path/to/dir [alias] pushsite = push --sitename "sitename" ftp Then just use `hg pushsite` to upload. That’s how the website at http://draketo.de/proj/hgsite/ is created. If something goes wrong, use `hg pushsite -f` to force recreation and upload of all files. Features -------- - shows the history, branches, tags and bookmarks. - shows bugs tracked via the [b-extension]. - shows the readme. - shows forks which are defined as paths in `.hg/hgrc` - from any source hg supports. - uploads only hanged files (based on the time they were last modified), so uploads can be reasonably fast. - Supports FTP and FTPS. Use the latter if you can (just use URLs starting with `ftps://`). - static site (no vulnerabilities, little dependencies, high performance). Thanks to the static http support of [Mercurial], the clone and browse URLs are the same, so you can look at the site with your webbrowser or clone the repository with Mercurial using the same URL. [Mercurial]: http://mercurial.selenic.com "Fast and easy-to-use, free distributed version control system." The fork detection allows tieing multiple platforms together: It tracks repositories from any source for which Mercurial can calculate incoming and outgoing changes. And since the bugtracking happens via the b-extension, your bugtracking follows your code wherever you go. [b-extension]: http://mercurial.selenic.com/wiki/bExtension "Distributed Bug Tracking: Get bugs resolved, not organized" Basic Options ------------- $ hg site --help hg site [options] [folder] Create a static copy of the repository and/or upload it to an FTP server. use "hg help -e site" to show help for the site extension options: -n --name VALUE the repo name. Default: folder or last segment of the repo-path. -u --upload VALUE upload the repo to the given ftp host. Format: user:password@host/path/to/dir -f --force force recreating all commit files. Slow. -s --screenstyle VALUE use a custom stylesheet for display on screen -p --printstyle VALUE use a custom stylesheet for printing --mq operate on patch repository use "hg -v help site" to show global options Customization ------------- To change the appearance of your site, create it once and then copy style.css and print.css from `._site/`. Adapt them and use `-s path/to/your/screen.css` and `-p path/to/your/print.css` to use your adaptions. Notes ----- Copyright 2012 till 2014 Arne Babenhauserheide, Licensed under GPLv2 or later. Related: [git2html] [git2html]: http://hssl.cs.jhu.edu/~neal/git2html/ "A static repository generator for git"