Skip to content

Commit

Permalink
Add simple Parklife installation
Browse files Browse the repository at this point in the history
  • Loading branch information
timriley committed Jan 5, 2025
1 parent 178470f commit 02af2db
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.env*.local
build/
db/*.sqlite
log/*
node_modules/
public/
!public/*.html
node_modules/
db/*.sqlite
spec/examples.txt
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ gem "sqlite3"
gem "commonmarker"
gem "front_matter_parser"

# Static site generation
gem "parklife"

group :development do
gem "hanami-webconsole", "~> 2.2"
end
Expand Down
5 changes: 5 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ GEM
nenv (~> 0.1)
shellany (~> 0.0)
parallel (1.26.3)
parklife (0.6.1)
nokogiri
rack-test
thor
parser (3.3.6.0)
ast (~> 2.4.1)
racc
Expand Down Expand Up @@ -376,6 +380,7 @@ DEPENDENCIES
hanami-validations (~> 2.2)
hanami-view (~> 2.2)
hanami-webconsole (~> 2.2)
parklife
puma
rack-test
rake
Expand Down
19 changes: 19 additions & 0 deletions Parkfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# frozen_string_literal: true

require "hanami/boot"

Parklife.application.configure do |config|
config.app = Site::App
end

Parklife.application.routes do
root crawl: true

# Add further paths not discovered by crawling from the root:
#
# get '/hidden/pages', crawl: true
# get '/feed.atom'

# Services typically allow a custom 404 page.
# get '/404.html'
end
14 changes: 14 additions & 0 deletions bin/static-build
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env sh

set -eu

# Build with Parklife - and forward arguments sent to this script.
bundle exec parklife build "$@"

# Copy all public resources to ./build.
if [ -d public ]; then
cp -R public/* build
fi

# List all files in the build (useful for debugging).
find build -type f | sort

0 comments on commit 02af2db

Please sign in to comment.