===============================================================================
w3m Website
===============================================================================

A `static website for w3m <example.com>`_, a text-mode web browser.


Get the tooling
===============================================================================

Tooling of note
-------------------------------------------------------------------------------

• `Nix`_ (`alternate Nix installer`_): build final output
• `Tup`_: builds assets
• `Soupault`_: builds static outputs
• `Docutils`_ (& reStructruredText): feature-rich, lightweight markup syntax

.. _Nix: https://github.com/DeterminateSystems/nix-installer
.. _alternate Nix installer: https://github.com/DeterminateSystems/nix-installer
.. _Tup: https://gittup.org/tup/
.. _Soupault: https://github.com/DeterminateSystems/nix-installer
.. _Docutils: https://docutils.sourceforge.io

Nix developer shell
-------------------------------------------------------------------------------

Nix
	.. code:: sh-session

		$ nix-shell

Nix with Flakes
	.. code:: sh-session

		$ nix develop

.. tip::

	If you would like an automatic development shell when you ``cd`` into the
	project, try `direnv <https://direnv.net>`_.

	.. code:: sh-session

		$ cp .envrc.example .envrc
		$ direnv allow

	Then make the modifications you need for your environment such as setting
	``$DEV_SERVER_HOST`` or ``$DEV_SERVER_PORT``.

Update version pins for Nix
-------------------------------------------------------------------------------

.. code:: sh-session

	$ nix flake update


Building
===============================================================================

Using Nix

.. code:: sh-session

	$ nix-build -A $PKG ./release.nix


Using Nix with Flakes

.. code:: sh-session

	$ nix build .#$PKG

Inspect that output

.. code:: sh-session

	$ tree -l result

Final output to host statically
-------------------------------------------------------------------------------

.. code:: sh-session

	$ nix-build


Developing / writing content
===============================================================================

With ``watchexec`` you can run the dev server from the Nix shell (or
technically from ``./bin`` if you have the dependencies.

.. code:: sh-session

	$ watchexec --restart -- dev-server.sh
