From a9d54ef07b9065cef97994ec0957255e0385b139 Mon Sep 17 00:00:00 2001 From: Nick Parker Date: Fri, 30 Apr 2021 16:22:45 +1200 Subject: [PATCH] Switch to hugo rendering, fix links --- .build.yml | 6 ++++- README | 2 +- docs/_layouts/default.html | 24 ------------------ docs/config.toml | 1 + docs/{index.html => content/_index.html} | 2 +- docs/{docs.html => content/docs/_index.html} | 0 .../download/_index.html} | 4 +-- docs/layouts/_default/section.html | 1 + docs/layouts/index.html | 24 ++++++++++++++++++ docs/{ => static}/favicon.ico | Bin docs/{ => static}/marky-black.png | Bin docs/{ => static}/style.css | 0 12 files changed, 35 insertions(+), 29 deletions(-) delete mode 100644 docs/_layouts/default.html create mode 100644 docs/config.toml rename docs/{index.html => content/_index.html} (97%) rename docs/{docs.html => content/docs/_index.html} (100%) rename docs/{download.html => content/download/_index.html} (85%) create mode 120000 docs/layouts/_default/section.html create mode 100644 docs/layouts/index.html rename docs/{ => static}/favicon.ico (100%) rename docs/{ => static}/marky-black.png (100%) rename docs/{ => static}/style.css (100%) diff --git a/.build.yml b/.build.yml index b52ee9c..7e5dddb 100644 --- a/.build.yml +++ b/.build.yml @@ -1,11 +1,15 @@ # sourcehut build: push docs/* to website image: alpine/latest +packages: +- hugo oauth: pages.sr.ht/PAGES:RW environment: repo: marky tasks: - package: | cd $repo/docs/ - tar -cvz . > ../../site.tar.gz + hugo + cd public/ + tar -cvz . > ../../../site.tar.gz - upload: | acurl -f https://pages.sr.ht/publish/$repo.nickbp.com -Fcontent=@site.tar.gz diff --git a/README b/README index a93d071..35f83a4 100644 --- a/README +++ b/README @@ -6,4 +6,4 @@ Building marky: 4) "make" 5) See "bin/apps/marky-file" or "py/example.py" -Docs: http://nickbp.github.io/marky/ +Docs: https://marky.nickbp.com/ diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html deleted file mode 100644 index 186c178..0000000 --- a/docs/_layouts/default.html +++ /dev/null @@ -1,24 +0,0 @@ - - - {{ page.title }} - - - - -
-
- marky -
- - -
- {{ content }} -
-
- - diff --git a/docs/config.toml b/docs/config.toml new file mode 100644 index 0000000..1e09ae9 --- /dev/null +++ b/docs/config.toml @@ -0,0 +1 @@ +languageCode = "en-us" \ No newline at end of file diff --git a/docs/index.html b/docs/content/_index.html similarity index 97% rename from docs/index.html rename to docs/content/_index.html index ede9dda..01172af 100644 --- a/docs/index.html +++ b/docs/content/_index.html @@ -4,7 +4,7 @@ title: marky ---

Marky is a library for creating Markov chains from arbitrary text input. It comes with a simple command line front end, named marky-file, which can be used to read text files and produce entertaining output.

-

The library is divided into several discrete components, allowing developers and advanced users to easily customize and extend its behavior. It currently supports a few scoring and selection methods, and temporary (hash map) or persistent (SQLite) storage of its state. For a description of Marky's internal structure, take a look at the documentation.

+

The library is divided into several discrete components, allowing developers and advanced users to easily customize and extend its behavior. It currently supports a few scoring and selection methods, and temporary (hash map) or persistent (SQLite) storage of its state. For a description of Marky's internal structure, take a look at the documentation.

It's also pretty fast. In a Release build on my 3 year old laptop, the marky-file tool imports all of "My Antonia" and produces a chain in about 0.25 seconds. If the data is imported into a SQLite db (~3 seconds), it takes around 0.1 seconds to produce a chain from that. Here are some examples:

diff --git a/docs/docs.html b/docs/content/docs/_index.html similarity index 100% rename from docs/docs.html rename to docs/content/docs/_index.html diff --git a/docs/download.html b/docs/content/download/_index.html similarity index 85% rename from docs/download.html rename to docs/content/download/_index.html index 940da95..4a120c1 100644 --- a/docs/download.html +++ b/docs/content/download/_index.html @@ -13,9 +13,9 @@ title: marky - download

Getting the Code

-

Get the latest Source Code from Git.

+

Get the latest Source Code from Git.

-

$ git clone git://github.com/nickbp/marky.git

+

$ git clone https://git.sr.ht/~nickbp/marky

Building

diff --git a/docs/layouts/_default/section.html b/docs/layouts/_default/section.html new file mode 120000 index 0000000..79c5d6f --- /dev/null +++ b/docs/layouts/_default/section.html @@ -0,0 +1 @@ +../index.html \ No newline at end of file diff --git a/docs/layouts/index.html b/docs/layouts/index.html new file mode 100644 index 0000000..35a48c9 --- /dev/null +++ b/docs/layouts/index.html @@ -0,0 +1,24 @@ + + + {{ .Title }} + + + + +
+
+ marky +
+ + +
+ {{ .Content }} +
+
+ + diff --git a/docs/favicon.ico b/docs/static/favicon.ico similarity index 100% rename from docs/favicon.ico rename to docs/static/favicon.ico diff --git a/docs/marky-black.png b/docs/static/marky-black.png similarity index 100% rename from docs/marky-black.png rename to docs/static/marky-black.png diff --git a/docs/style.css b/docs/static/style.css similarity index 100% rename from docs/style.css rename to docs/static/style.css -- 2.34.5