Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ytvwld/hyde-gopher
Serve your Hyde site over Gopher
https://github.com/ytvwld/hyde-gopher
gopher hyde static-site-generator
Last synced: 7 days ago
JSON representation
Serve your Hyde site over Gopher
- Host: GitHub
- URL: https://github.com/ytvwld/hyde-gopher
- Owner: YtvwlD
- License: gpl-3.0
- Created: 2020-04-30T22:42:34.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-23T16:41:51.000Z (over 1 year ago)
- Last Synced: 2024-10-11T18:56:45.381Z (27 days ago)
- Topics: gopher, hyde, static-site-generator
- Language: Python
- Homepage:
- Size: 99.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hyde-gopher
[![Build Status](https://travis-ci.org/YtvwlD/hyde-gopher.svg?branch=main)](https://travis-ci.org/YtvwlD/hyde-gopher)
Serve your [Hyde](https://hyde.github.io/) site over
[Gopher](https://en.wikipedia.org/wiki/Gopher_(protocol)).
(This is primarily made possible by [flask-gopher](https://github.com/michael-lazar/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
```shell
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:```shell
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`:
```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 , 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:```shell
python3 -m pip install git+https://github.com/hyde/[email protected]
```