Skip to content

Commit 9e82950

Browse files
committed
#37 top-level "index.html" symlink should point to "intro" page
1 parent f492a30 commit 9e82950

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

Diff for: Makefile

+13-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111

1212
#
13-
# Copyright 2014 (c) Joyent, Inc. All rights reserved.
13+
# Copyright 2019 Joyent, Inc.
1414
#
1515

1616
PYTHON = python
@@ -51,14 +51,21 @@ FILES = \
5151
glossary \
5252
license
5353

54+
#
55+
# So that the bare "/books/dev" URL works, we nominate one of the top-level
56+
# pages to be the target of an "index.html" symlink:
57+
#
58+
INDEX_FILE = intro
59+
5460
OUTDIR = output
5561
BOOTSTRAP_OUTDIRS = \
5662
$(BOOTSTRAP_TYPES:%=$(OUTDIR)/bootstrap/%)
5763

5864
OUTFILES = \
5965
$(FILES:%=$(OUTDIR)/%.html) \
6066
$(IMAGE_FILES:%=$(OUTDIR)/img/%) \
61-
$(BOOTSTRAP_FILES:%=$(OUTDIR)/bootstrap/%)
67+
$(BOOTSTRAP_FILES:%=$(OUTDIR)/bootstrap/%) \
68+
$(OUTDIR)/index.html
6269

6370

6471
all: $(OUTDIR) $(BOOTSTRAP_OUTDIRS) $(OUTFILES)
@@ -72,6 +79,10 @@ $(OUTDIR)/img:
7279
$(BOOTSTRAP_OUTDIRS):
7380
mkdir -p "$@"
7481

82+
$(OUTDIR)/index.html:
83+
rm -f "$@"
84+
ln -s $(INDEX_FILE).html "$@"
85+
7586
$(OUTDIR)/%.html: % $(HEADER) $(TRAILER) $(OUTDIR)
7687
sed '/<!-- vim:[^:]*: -->/d' $(HEADER) > $@
7788
$(TOC) $< $(FILES) >> $@

0 commit comments

Comments
 (0)