Working on the docs.

The nbconvert tool has different behaviour now, so the HTML versions of
the notebooks look different.
This commit is contained in:
sforman 2023-07-27 08:55:43 -07:00
parent 9ca9239738
commit 0a1b150eb5
43 changed files with 463841 additions and 483328 deletions

View File

@ -1,16 +1,16 @@
# Docs toplevel makefile.
README=./source/index.md
BUILD_SCRIPT=build_index.py
GENERATOR=python $(BUILD_SCRIPT)
HTML_OUTPUT_DIR=./html
NOTEBOOK_OUTPUT_DIR=$(HTML_OUTPUT_DIR)/notebooks
INDEX = ./source/index.md
BUILD_SCRIPT = build_index.py
GENERATOR = python $(BUILD_SCRIPT)
HTML_OUTPUT_DIR = ./html
NOTEBOOK_OUTPUT_DIR = $(HTML_OUTPUT_DIR)/notebooks
INDEX_OUT = $(HTML_OUTPUT_DIR)/index.html
all: $(INDEX_OUT)
$(INDEX_OUT): $(INDEX) $(BUILD_SCRIPT)
$(GENERATOR) $(INDEX) > $(INDEX_OUT)
all: $(HTML_OUTPUT_DIR)/index.html
$(HTML_OUTPUT_DIR)/index.html: $(README) $(BUILD_SCRIPT)
$(GENERATOR) $(README) > $(HTML_OUTPUT_DIR)/index.html
# python -m markdown -f index.html -o html $(README)
# python -m markdown -f index.html -o html $(INDEX)

View File

@ -49,7 +49,7 @@ interesting aspects. It's quite a treasure trove.</p>
two integers and increments or decrements one of them such that the new
pair of numbers is the next coordinate pair in a square spiral (like the
kind used to construct an <a href="https://en.wikipedia.org/wiki/Ulam_spiral">Ulam Spiral</a>).
For more information see <a href="https://joypy.osdn.io/notebooks/Square_Spiral.html">Square Spiral Example Joy Code</a>.</p>
For more information see <a href="/notebooks/Square_Spiral.html">Square Spiral Example Joy Code</a>.</p>
<pre><code>square_spiral [_p] [_then] [_else] ifte
_p [_p0] [_p1] &amp;&amp;
@ -71,13 +71,13 @@ _else [pop !-] [--] [++] ifte
</ul>
<h2>Documentation</h2>
<p>This document describes Joy in a general way below, however most of the
documentation is in the form of <a href="https://joypy.osdn.io/notebooks/index.html">Jupyter Notebooks</a>
documentation is in the form of <a href="/notebooks/index.html">Jupyter Notebooks</a>
that go into more detail.</p>
<p><strong><a href="https://joypy.osdn.io/notebooks/index.html">Jupyter Notebooks</a></strong></p>
<p>There's also a <a href="https://git.sr.ht/~sforman/Thun/tree/trunk/item/docs/reference">Function Reference</a> that lists each
<p><strong><a href="/notebooks/index.html">Jupyter Notebooks</a></strong></p>
<p>There's also a <a href="/FuncRef.html">Function Reference</a> that lists each
function and combinator by name and gives a brief description. (It's
usually out of date, I'm working on it.)</p>
<p><strong><a href="https://git.sr.ht/~sforman/Thun/tree/trunk/item/docs/reference">Function Reference</a></strong></p>
<p><strong><a href="/FuncRef.html">Function Reference</a></strong></p>
<h3>Building the Docs</h3>
<p>Run <code>make</code> in the <code>docs</code> directory. (This is a lie, it's more complex than
that. Really you need to run (GNU) make in the <code>docs/notebooks</code> and

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3,6 +3,7 @@
<head>
<meta charset="utf-8">
<title>Thun Notebooks</title>
<link rel="stylesheet" href="/css/fonts.css">
<link rel="stylesheet" href="/css/site.css">
</head>
<body>
@ -21,13 +22,16 @@ I'm in the process of rewriting them to use the Joy kernel.</p>
<li><a href="/notebooks/Advent_of_Code_2017_December_4th.html">Advent of Code 2017 December 4th</a></li>
<li><a href="/notebooks/Advent_of_Code_2017_December_5th.html">Advent of Code 2017 December 5th</a></li>
<li><a href="/notebooks/Advent_of_Code_2017_December_6th.html">Advent of Code 2017 December 6th</a></li>
<li><a href="/notebooks/BigInts.html">BigInts</a></li>
<li><a href="/notebooks/Compiling_Joy.html">Compiling Joy</a></li>
<li><a href="/notebooks/Correcet_Programming.html">Correcet Programming</a></li>
<li><a href="/notebooks/Derivatives_of_Regular_Expressions.html">Derivatives of Regular Expressions</a></li>
<li><a href="/notebooks/Generator_Programs.html">Generator Programs</a></li>
<li><a href="/notebooks/Hylo-,_Ana-,_Cata-,_and_Para-morphisms_-_Recursion_Combinators.html">Hylo-, Ana-, Cata-, and Para-morphisms - Recursion Combinators</a></li>
<li><a href="/notebooks/Intro-to-Joy.html">Intro-to-Joy</a></li>
<li><a href="/notebooks/Joy-in-Jupyter.html">Joy-in-Jupyter</a></li>
<li><a href="/notebooks/Multiples-of-3-and-5.html">Multiples-of-3-and-5</a></li>
<li><a href="/notebooks/NeoAero.html">NeoAero</a></li>
<li><a href="/notebooks/Newton-Raphson.html">Newton-Raphson</a></li>
<li><a href="/notebooks/Ordered_Binary_Trees.html">Ordered Binary Trees</a></li>
<li><a href="/notebooks/Quadratic.html">Quadratic</a></li>

File diff suppressed because one or more lines are too long

View File

@ -14,7 +14,7 @@ index.html: build_index.py $(docs_html)
python build_index.py > index.html
$(docs_html): %.html : %.ipynb
jupyter nbconvert --to html --template basic $<
jupyter nbconvert --to html --template classic $<
mov: $(docs_html) index.html
mv -v $? ../html/notebooks/

View File

@ -44,6 +44,7 @@ print(f'''\
<head>
<meta charset="utf-8">
<title>Thun Notebooks</title>
<link rel="stylesheet" href="/css/fonts.css">
<link rel="stylesheet" href="/css/site.css">
</head>
<body>

View File

@ -45,7 +45,7 @@ Here is an example of Joy code. This function `square_spiral` accepts
two integers and increments or decrements one of them such that the new
pair of numbers is the next coordinate pair in a square spiral (like the
kind used to construct an [Ulam Spiral](https://en.wikipedia.org/wiki/Ulam_spiral)).
For more information see [Square Spiral Example Joy Code](https://joypy.osdn.io/notebooks/Square_Spiral.html).
For more information see [Square Spiral Example Joy Code](/notebooks/Square_Spiral.html).
square_spiral [_p] [_then] [_else] ifte
@ -72,16 +72,16 @@ It might seem unreadable but with familiarity it becomes as legible as any other
## Documentation
This document describes Joy in a general way below, however most of the
documentation is in the form of [Jupyter Notebooks](https://joypy.osdn.io/notebooks/index.html)
documentation is in the form of [Jupyter Notebooks](/notebooks/index.html)
that go into more detail.
**[Jupyter Notebooks](https://joypy.osdn.io/notebooks/index.html)**
**[Jupyter Notebooks](/notebooks/index.html)**
There's also a [Function Reference](https://git.sr.ht/~sforman/Thun/tree/trunk/item/docs/reference) that lists each
There's also a [Function Reference](/FuncRef.html) that lists each
function and combinator by name and gives a brief description. (It's
usually out of date, I'm working on it.)
**[Function Reference](https://git.sr.ht/~sforman/Thun/tree/trunk/item/docs/reference)**
**[Function Reference](/FuncRef.html)**