Skip to content

Commit fce128e

Browse files
committed
Update site docs
1 parent c41cceb commit fce128e

22 files changed

+48
-558
lines changed

docs/404.html

+2-3
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@
2020
</div>
2121
<div class="navbar-menu">
2222
<div class="navbar-start">
23+
<a class="navbar-item" href="https://basswood-io.com/blog">Blog</a>
24+
<a class="navbar-item" href="/installing">Install</a>
2325
<a class="navbar-item" href="/docs">Docs</a>
24-
<a class="navbar-item" href="/blog">Blog</a>
2526
<a class="navbar-item" href="/ref">Ref</a>
26-
<a class="navbar-item" href="/source">Source</a>
27-
<a class="navbar-item" href="/contact">Contact</a>
2827
<a class="navbar-item" href="/app">App</a>
2928
</div>
3029
</div>

docs/components/nav.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
</div>
88
<div class="navbar-menu">
99
<div class="navbar-start">
10+
<a class="navbar-item" href="https://basswood-io.com/blog">Blog</a>
11+
<a class="navbar-item" href="/installing">Install</a>
1012
<a class="navbar-item" href="/docs">Docs</a>
11-
<a class="navbar-item" href="/blog">Blog</a>
1213
<a class="navbar-item" href="/ref">Ref</a>
1314
<a class="navbar-item" href="https://app.auto-editor.com">App</a>
1415
</div>

docs/make.nim

+5-27
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ func shouldProcessFile(path: string): bool =
88
return false
99

1010
let ext = path.splitFile().ext.toLowerAscii()
11-
return ext notin [".webp", ".png", ".jpeg", ".jpg", ".svg"]
11+
return ext notin [".avif", ".webp", ".png", ".jpeg", ".jpg", ".svg"]
1212

1313
proc parseTemplate(content: string, compName: string, compContent: string): string =
1414
var newContent = content
@@ -75,10 +75,6 @@ proc processDirectory(dir: string) =
7575
################################
7676

7777
type
78-
PragmaKind = enum
79-
normalType,
80-
blogType,
81-
8278
TokenKind = enum
8379
tkBar,
8480
keyval,
@@ -529,12 +525,10 @@ func paintPalet(v: string): string =
529525
i += 1
530526

531527

532-
proc convert(pragma: PragmaKind, file: string, path: string) =
528+
proc convert(file: string, path: string) =
533529
let text = readFile(file)
534530
var
535531
lexer = initLexer(file, text)
536-
author = ""
537-
date = ""
538532
desc = ""
539533

540534
if getNextToken(lexer).kind != tkBar:
@@ -556,11 +550,6 @@ proc convert(pragma: PragmaKind, file: string, path: string) =
556550

557551
let title = parse_keyval("title")
558552

559-
if pragma == blogType:
560-
author = parse_keyval("author")
561-
date = parse_keyval("date")
562-
desc = parse_keyval("desc")
563-
564553
if getNextToken(lexer).kind != tkBar:
565554
lexer.error("head: expected end ---")
566555

@@ -609,12 +598,6 @@ proc convert(pragma: PragmaKind, file: string, path: string) =
609598
<div class="container">
610599
""")
611600

612-
if pragma == blogType:
613-
f.write(&"""
614-
<h1>{title}</h1>
615-
<p class="author-date">{author}&nbsp;&nbsp;&nbsp;{date}</p>
616-
""")
617-
618601
let blocks: seq[TokenKind] = @[tkText, tkH1, tkH2, tkH3, tkList, tkUl]
619602

620603
proc toTag(t: TokenKind): string =
@@ -727,16 +710,11 @@ proc convert(pragma: PragmaKind, file: string, path: string) =
727710

728711

729712
proc main() =
730-
convert(normalType, "public/blog/index.md", "public/blog/index.html")
731-
convert(normalType, "public/ref/index.md", "public/ref/index.html")
732-
for file in walkFiles("public/blog/*.md"):
733-
convert(blogType, file, file.changeFileExt("html"))
734-
713+
convert("public/ref/index.md", "public/ref/index.html")
735714
for file in walkFiles("public/docs/*.md"):
736-
convert(normalType, file, file.changeFileExt("html"))
737-
715+
convert(file, file.changeFileExt("html"))
738716
for file in walkFiles("public/docs/subcommands/*.md"):
739-
convert(normalType, file, file.changeFileExt("html"))
717+
convert(file, file.changeFileExt("html"))
740718

741719
processDirectory("public")
742720
echo "done building"

docs/server.js

+8
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ app.get("/app/*", (req, res) => {
99
res.redirect(301, `https://app.auto-editor.com${newPath}`);
1010
});
1111

12+
app.get("/blog/", (req, res) => {
13+
res.redirect(301, `https://basswood-io.com/blog`);
14+
});
15+
app.get("/blog/*", (req, res) => {
16+
console.log(req.path);
17+
res.redirect(301, `https://basswood-io.com${req.path}`);
18+
});
19+
1220
app.get("/options", (req, res) => {
1321
let options = {
1422
headers: {"Content-Type": "text/html"}

docs/src/blog/audio-one-pass.md

-27
This file was deleted.

docs/src/blog/how-to-compile-ffmpeg-on-windows.md

-55
This file was deleted.

docs/src/blog/index.md

-19
This file was deleted.

docs/src/blog/nim-vs-zig.md

-85
This file was deleted.

docs/src/blog/saving-memory.md

-59
This file was deleted.

0 commit comments

Comments
 (0)