Skip to main content

hyde-gopher

Build Status

Serve your Hyde site over Gopher. (This is primarily made possible by flask-gopher, yay.)

Installation

pandoc is needed to parse Markdown, so you'll need to have this installed.

Release

You can install the latest relase from PyPI by running

python3 -m pip install hyde-gopher

From source

If you want to use the latest development snapshot (which may be broken), you'll need to clone or download the repository and then install the package with:

python3 -m pip install .

If you don't want to install anything, you can replace hyde-gopher with python3 -m hyde_gopher.main in the following steps.

Usage

Setup

As Gopher supports only absolute links and there's no such thing as a Host header, hyde-gopher needs to know the absolute base path of your site when generating the static site. (If you're using the built-in webserver this is currently being guessed from the bind configuration which may lead to broken links. Please use the built-in webserver just for local tests and not for internet-facing deployments.)

There are also a few things you might want to configure but don't have to.

To do so, add the following lines to your site.yaml:

gopher_base_url: gopher://gopher.mysite.invalid:71/~user/ # needed
gopher_layout_root: layout_gopher # this is the default
gopher_width: 70 # this is the default

If you don't want to create your layout from scratch you can use a bundled one – to do so, run hyde-gopher init.

Serve

You can use the built-in webserver for a quick test – and also for pre-viewing your site while editing it.

To do so, run hyde-gopher serve.

Per default, this will serve the site from the current working directory at gopher://localhost:7070/, placing generated files into deploy_gopher/. (You can change this, see hyde-gopher -h and hyde-gopher serve -h for more options.)

Generate

The primary purpose of hyde-gopher is to generate a static site (just like hyde's).

To do so, run hyde-gopher gen.

Per default, this will generate a static version of the site from the current working directory to the folder deploy_gopher/. (You can change this, see hyde-gopher -h and hyde-gopher gen -h for more options.)

Knonwn issues / TODO

  • links in HTML pages are not rendered as links (it works in Markdown, though)
  • images are only linked if you use a macro to render them
  • just HTML files, binaries and folders are considered

Gotchas

hyde-gopher needs Python >= 3.6.

The currenty stable release of hyde (0.8.9) needs Python < 3. You'll need to install the pre-release of hyde 0.9.0 to get this working:

python3 -m pip install git+https://github.com/hyde/hyde.git@V0.9.0

Metadata

Release files for hyde-gopher 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for hyde-gopher 0.4.0
File Interpreter ABI Platform Actions
hyde_gopher-0.4.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for hyde_gopher-0.4.0-py2.py3-none-any.whl

Release files / hyde_gopher-0.4.0-py2.py3-none-any.whl

Download URL hyde_gopher-0.4.0-py2.py3-none-any.whl
Size 23.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ee77bf5e606c5eaab80255c185a1c0174acb207372350001f6fa05aaa7c8ec6d
BLAKE2b-256 checksum
How to use checksums
622091ca188473cc7b43ed9278adb93439eb038e36f13d376708de01ac084d84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6

Security for hyde-gopher 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page