Skip to content
This repository has been archived by the owner on Nov 3, 2018. It is now read-only.

Commit

Permalink
1 create preivew-docs.git
Browse files Browse the repository at this point in the history
  • Loading branch information
rmustacc committed Jan 5, 2014
0 parents commit 47a97e5
Show file tree
Hide file tree
Showing 17 changed files with 12,277 additions and 0 deletions.
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2014, Robert Mustacchi <rm@fingolfin.org>. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE
87 changes: 87 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

#
# Copyright 2013 (c) Joyent, Inc. All rights reserved.
#

PTYHON = python
MDPATH = ./support
MD = $(MDPATH)/markdown2.py
TOC = ./support/gentoc.sh

HEADER = assets/header.html
TRAILER = assets/trailer.html

BOOTSTRAP_MIN = .min
BOOTSTRAP_TYPES = css img js
BOOTSTRAP_FILES = \
css/bootstrap$(BOOTSTRAP_MIN).css \
img/glyphicons-halflings-white.png \
img/glyphicons-halflings.png \
js/bootstrap$(BOOTSTRAP_MIN).js

MDARGS = \
--extras fenced-code-blocks \
--extras wiki-tables \
--extras link-patterns \
--link-patterns-file support/link-patterns.txt

IMAGE_FILES = \
illumos_phoenix_small.png

FILES = \
preview

OUTDIR = output
BOOTSTRAP_OUTDIRS = \
$(BOOTSTRAP_TYPES:%=$(OUTDIR)/bootstrap/%)

OUTFILES = \
$(FILES:%=$(OUTDIR)/%.html) \
$(IMAGE_FILES:%=$(OUTDIR)/img/%) \
$(BOOTSTRAP_FILES:%=$(OUTDIR)/bootstrap/%)


all: $(OUTDIR) $(BOOTSTRAP_OUTDIRS) $(OUTFILES)

$(OUTDIR):
mkdir -p "$@"

$(OUTDIR)/img:
mkdir -p "$@"

$(BOOTSTRAP_OUTDIRS):
mkdir -p "$@"

$(OUTDIR)/%.html: % $(HEADER) $(TRAILER) $(OUTDIR)
sed '/<!-- vim:[^:]*: -->/d' $(HEADER) > $@
$(TOC) $< $(FILES) >> $@
$(PYTHON) $(MD) $(MDARGS) $< >> $@
sed '/<!-- vim:[^:]*: -->/d' $(TRAILER) >> $@

$(OUTDIR)/img/%: assets/% $(OUTDIR)/img
cp $< $@
touch $@

$(OUTDIR)/bootstrap/%: assets/bootstrap/% $(BOOTSTRAP_OUTDIRS)
cp $< $@
touch $@

clean: clobber

clobber:
rm -rf output

sync: all
cd output && manta-sync ./ ~~/public/preview

FRC:

0 comments on commit 47a97e5

Please sign in to comment.