Generate index.html without "target=article" so links open in current browser tab.
--- a/Makefile Fri Nov 04 16:29:24 2011 +0200
+++ b/Makefile Fri Nov 04 16:12:20 2011 +0200
@@ -35,7 +35,8 @@
HTML_DIR := tips-html
RST_HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES))
-HTML_FILES := $(RST_HTML_FILES) $(HTML_DIR)/index.html $(HTML_DIR)/index-frame.html
+HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES)) \
+ $(HTML_DIR)/index.html $(HTML_DIR)/frame.html $(HTML_DIR)/frame-index.html
TXT__FILES := $(addprefix $(HTML_DIR)/,$(TXT_FILES))
CHM_FILES := $(addprefix $(HTML_DIR)/,chm.hhp chm.hhc chm.stp)
@@ -54,8 +55,11 @@
$(HTML_DIR)/%.html: %.rst rst.css | $(HTML_DIR)
$(RST2HTML) --stylesheet=rst.css $*.rst $@
+$(HTML_DIR)/frame-index.html: index.sh $(RST_HTML_FILES) | $(HTML_DIR)
+ ./index.sh frame >$@
+
$(HTML_DIR)/index.html: index.sh $(RST_HTML_FILES) | $(HTML_DIR)
- ./index.sh frame >$@
+ ./index.sh html >$@
$(HTML_DIR)/%.html: %.html | $(HTML_DIR)
cp $< $@
@@ -77,7 +81,7 @@
./chm-hhc.sh >$@
$(HTML_DIR)/index-chm.html: index.sh | $(HTML_DIR)
- ./index.sh chm >$@
+ ./index.sh html >$@
################################################################
# Init targets.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/frame.html Fri Nov 04 16:12:20 2011 +0200
@@ -0,0 +1,10 @@
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>tips index</title>
+</head>
+<frameset cols="220,*">
+ <frame src="frame-index.html" name="toc">
+ <frame src="index.html" name="article">
+</frameset>
+</html>
--- a/index-frame.html Fri Nov 04 16:29:24 2011 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>tips index</title>
-</head>
-<frameset cols="220,*">
- <frame src="index.html" name="toc">
- <frame src="index.html" name="article">
-</frameset>
-</html>
--- a/index.sh Fri Nov 04 16:29:24 2011 +0200
+++ b/index.sh Fri Nov 04 16:12:20 2011 +0200
@@ -21,7 +21,7 @@
[ "$ext" = "rst" ] && ext=html
name=${file%.*}
case "$1" in
- chm) echo " <li><a href=\"$name.$ext\">$name</a>" ;;
+ html) echo " <li><a href=\"$name.$ext\">$name</a>" ;;
frame) echo " <li><a href=\"$name.$ext\" target=\"article\">$name</a>" ;;
*) exit 1 ;;
esac