Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timriley/my-site
Work in progress personal website; proof of concept static site generator using dry-system, rom-rb, and dry-view
https://github.com/timriley/my-site
Last synced: 3 months ago
JSON representation
Work in progress personal website; proof of concept static site generator using dry-system, rom-rb, and dry-view
- Host: GitHub
- URL: https://github.com/timriley/my-site
- Owner: timriley
- Created: 2018-02-23T11:32:01.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2024-10-05T14:34:26.000Z (3 months ago)
- Last Synced: 2024-10-09T22:58:08.278Z (3 months ago)
- Language: Ruby
- Homepage:
- Size: 16.5 MB
- Stars: 13
- Watchers: 5
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tim’s site
This is my personal home page, implemented as a [Hanami][hanami] app extended to produce static
content for deployment.[hanami]: http://hanamirb.org
## Getting started
Run `./bin/setup` to set up the application.
Review `.env` and adjust the settings as required.
## Building the site
Run `./bin/build` to build the site. This will empty the `build/` directory and then repopulate it
with a new copy of the site's files.## Rationale
I wanted a static site generator that would allow me to work in the same way I do when building a
typical server-side web application. So rather than building within the confines of a static site
generation framework, I wanted an ordinary Ruby app app that just so happens to export a static site
as part of its behavior.This means:
- A standard, extensible application structure, provided here by [Hanami][hanami].
- A focus on data and types
- A distinct layer for with working with persisted data
- And a fully-fleshed view layer (with proper encapsulation of view behaviour, no helpers!)## Structure
This is a typical Hanami app, with a couple of additions:
- An in-memory SQLite database, populated from the static files in `source/` by `Site::Prepare`
- An extension to the router that captures GET routes
- A `Site::Generate` that uses these routes and their matching actions to output static content
- An `#each` method on dynamic actions that outputs their possible slugs, used by the above
- All tied together by a `bin/build` script that is run on deploy to create the static site## License
All code is MIT licensed. All site content (in `app/assets/` and `source/`) is copyright Tim Riley,
all rights reserved.