summaryrefslogtreecommitdiff
path: root/gwblog.bas
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeffrey.armstrong@approximatrix.com>2016-10-22 13:20:24 -0400
committerJeffrey Armstrong <jeffrey.armstrong@approximatrix.com>2016-10-22 13:20:24 -0400
commitef4863661495fd5c8a570b3233eb7581040e69cb (patch)
tree13caa36ae5c736c274f6388577d5f56d4bb50f03 /gwblog.bas
parent01b00fb56dbd59782d2b2334b0e0c13bc2d41e09 (diff)
downloadgwblog-ef4863661495fd5c8a570b3233eb7581040e69cb.tar.gz
gwblog-ef4863661495fd5c8a570b3233eb7581040e69cb.zip
Added list of all posts and fixed bugs in link list generation. Added creation of an index file.
Diffstat (limited to 'gwblog.bas')
-rw-r--r--gwblog.bas27
1 files changed, 25 insertions, 2 deletions
diff --git a/gwblog.bas b/gwblog.bas
index 40345ee..e80d4d6 100644
--- a/gwblog.bas
+++ b/gwblog.bas
@@ -35,7 +35,7 @@
900 REM =======================
901 REM Prepare template data
902 REM =======================
-905 ILBL = 6
+905 ILBL = 7
910 DIM LBL$[ILBL]
920 DIM REPL$[ILBL]
930 LBL$[1] = "title":REPL$[1] = "Blog!"
@@ -46,6 +46,7 @@
980 URLS$ = PAGES$:LBLS$ = PAGETIT$:URLCOUNT = PAGECNT:GOSUB 19100
990 LBL$[5] = "pages":REPL$[5] = HTMLLST$
995 LBL$[6] = "date":REPL$[6] = ""
+997 LBL$[7] = "postlist":REPL$[7] = "<a href='allposts.htm'>All Posts</a>"
1000 REM ======================
1001 REM Process pages
1000 REM ======================
@@ -77,6 +78,28 @@
1320 DESTD$ = DESTDIR$ + "\STATIC"
1330 SHELL "MKDIR "+DESTD$
1340 GOSUB 21000
-
+1400 REM ======================
+1401 REM Index page
+1402 REM ======================
+1410 SRCD$ = DESTDIR$ + "\" + LEFT$(POSTS$[POSTCNT], LEN(POSTS$[POSTCNT])-3) + "HTM"
+1420 DESTD$ = DESTDIR$ + "\INDEX.HTM"
+1430 PRINT "Creating index.htm from latest post..."
+1440 SHELL "COPY "+SRCD$+" "+DESTD$
+1500 REM ======================
+1501 REM List of all posts
+1502 REM ======================
+1505 PRINT "Generating a list of posts..."
+1510 PAGET$ = "All Posts"
+1520 ERASE URLS$, LBLS$
+1530 DIM URLS$[POSTCNT]
+1540 DIM LBLS$[POSTCNT]
+1550 FOR FINDEX = 1 TO POSTCNT
+1560 URLS$[FINDEX] = POSTS$[FINDEX]:LBLS$[FINDEX] = POSTTIT$[FINDEX]
+1570 NEXT FINDEX
+1580 URLCOUNT = POSTCNT
+1590 GOSUB 19100
+1600 HTMLTEXT$ = "<h1>List of All Posts</h1>" + HTMLLST$
+1610 OUTFILE$ = DESTDIR$ + "\ALLPOSTS.HTM"
+1620 GOSUB 6500
1990 PRINT "Site Generation Complete."
1999 END