Skip to content

Commit

Permalink
Welcome 2024
Browse files Browse the repository at this point in the history
Update dependency gems
Switch to dart sass
Switch to better live reload
Simplify Makefile
Fix ruby on netlify
  • Loading branch information
carstene1ns committed Apr 2, 2024
1 parent 373fff3 commit 0b9bcf1
Show file tree
Hide file tree
Showing 10 changed files with 117 additions and 116 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
/output/
/output.diff
/crash.log
/.sass-cache/

# bundler
/bin/
Expand Down
29 changes: 16 additions & 13 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@

source 'https://rubygems.org'

gem 'nanoc', '~> 4.12' # engine
gem 'kramdown' # markdown converter
gem 'typogruby' # text enhancements
gem 'rouge' # syntax highlighting
gem 'slim' # templates
gem 'builder' # xml sitemaps
gem 'sass' # css conversion
gem 'yuicompressor' # css/js uglifying
gem 'ruby-xxHash' # for cache busting
gem 'nanoc', '~> 4.12' # engine
gem 'kramdown' # markdown converter
gem 'typogruby' # text enhancements
gem 'rouge' # syntax highlighting
gem 'slim' # templates
gem 'builder' # xml sitemaps
gem 'yuicompressor' # css/js uglifying
gem 'ruby-xxHash' # for cache busting

group :nanoc do
gem 'guard-nanoc' # automatic rebuilds
gem 'adsf' # tiny webserver
gem 'puma' # webserver backend
gem 'nanoc-dart-sass' # css conversion
gem 'nanoc-live' # automatic rebuilds
end

group :development do
gem 'adsf' # tiny webserver
gem 'puma' # webserver backend
end

group :test do
Expand All @@ -23,4 +26,4 @@ group :test do
end

# nanoc is incompatible with ancient ruby
ruby '> 2.4'
ruby '>= 2.7'
149 changes: 77 additions & 72 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,127 +1,132 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.4)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
adsf (1.4.7)
adsf (1.5.0)
rack (>= 1.0.0, < 4.0.0)
rackup (~> 2.1)
adsf-live (1.5.0)
adsf (~> 1.3)
em-websocket (~> 0.5)
eventmachine (~> 1.2)
listen (~> 3.0)
rack-livereload (~> 0.3)
base64 (0.2.0)
builder (3.2.4)
coderay (1.1.3)
colored (1.2)
concurrent-ruby (1.2.2)
concurrent-ruby (1.2.3)
cri (2.15.11)
ddmetrics (1.0.1)
ddmetrics (1.1.0)
ddplugin (1.0.3)
diff-lcs (1.5.0)
ffi (1.15.5)
formatador (1.1.0)
guard (2.18.0)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (>= 1.0.12, < 2.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.13.0)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-nanoc (2.1.9)
guard (~> 2.8)
guard-compat (~> 1.0)
nanoc-cli (~> 4.11, >= 4.11.14)
nanoc-core (~> 4.11, >= 4.11.14)
hamster (3.0.0)
concurrent-ruby (~> 1.0)
json (2.6.3)
diff-lcs (1.5.1)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.16.3)
google-protobuf (3.25.3-x86_64-linux)
http_parser.rb (0.8.0)
immutable-ruby (0.1.0)
concurrent-ruby (~> 1.1)
sorted_set (~> 1.0)
json (2.7.1)
json_schema (0.21.0)
kramdown (2.4.0)
rexml
listen (3.8.0)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
lumberjack (1.2.8)
memo_wise (1.7.0)
memo_wise (1.8.0)
method_source (1.0.0)
mini_portile2 (2.8.1)
nanoc (4.12.15)
mini_portile2 (2.8.5)
nanoc (4.12.20)
addressable (~> 2.5)
colored (~> 1.2)
nanoc-checking (~> 1.0, >= 1.0.2)
nanoc-cli (= 4.12.15)
nanoc-core (= 4.12.15)
nanoc-cli (= 4.12.20)
nanoc-core (= 4.12.20)
nanoc-deploying (~> 1.0)
parallel (~> 1.12)
tty-command (~> 0.8)
tty-which (~> 0.4)
nanoc-checking (1.0.2)
nanoc-cli (~> 4.12, >= 4.12.4)
nanoc-core (~> 4.12, >= 4.12.4)
nanoc-cli (4.12.15)
nanoc-checking (1.0.3)
nanoc-cli (~> 4.12, >= 4.12.5)
nanoc-core (~> 4.12, >= 4.12.5)
nanoc-cli (4.12.20)
cri (~> 2.15)
diff-lcs (~> 1.3)
nanoc-core (= 4.12.15)
nanoc-core (= 4.12.20)
pry
zeitwerk (~> 2.1)
nanoc-core (4.12.15)
nanoc-core (4.12.20)
base64 (~> 0.2)
concurrent-ruby (~> 1.1)
ddmetrics (~> 1.0)
ddplugin (~> 1.0)
hamster (~> 3.0)
immutable-ruby (~> 0.1)
json_schema (~> 0.19)
memo_wise (~> 1.5)
psych (~> 4.0)
psych (>= 4.0, < 6.0)
slow_enumerator_tools (~> 1.0)
tty-platform (~> 0.2)
zeitwerk (~> 2.1)
nanoc-dart-sass (1.0.2)
nanoc-core (~> 4.12)
sass-embedded (~> 1.56)
nanoc-deploying (1.0.2)
nanoc-checking (~> 1.0)
nanoc-cli (~> 4.11, >= 4.11.15)
nanoc-core (~> 4.11, >= 4.11.15)
nenv (0.3.0)
nio4r (2.5.9)
nokogiri (1.14.3)
mini_portile2 (~> 2.8.0)
nanoc-live (1.0.0)
adsf-live (~> 1.4)
listen (~> 3.0)
nanoc-cli (~> 4.11, >= 4.11.14)
nanoc-core (~> 4.11, >= 4.11.14)
nio4r (2.7.1)
nokogiri (1.16.3)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
parallel (1.23.0)
parallel (1.24.0)
pastel (0.8.0)
tty-color (~> 0.5)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
psych (4.0.6)
psych (5.1.2)
stringio
public_suffix (5.0.1)
puma (6.2.2)
public_suffix (5.0.5)
puma (6.4.2)
nio4r (~> 2.0)
racc (1.6.2)
rack (3.0.7)
racc (1.7.3)
rack (3.0.10)
rack-livereload (0.6.0)
rack (~> 3.0.8)
rackup (2.1.0)
rack (>= 3)
webrick (~> 1.8)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (4.1.0)
rbtree (0.4.6)
rexml (3.2.6)
rouge (4.2.1)
ruby-xxHash (0.4.0.2)
rubypants (0.7.1)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
shellany (0.0.1)
slim (5.1.0)
sass-embedded (1.69.5-x86_64-linux-gnu)
google-protobuf (~> 3.23)
set (1.1.0)
slim (5.2.1)
temple (~> 0.10.0)
tilt (>= 2.0.6, < 2.2)
tilt (>= 2.1.0)
slow_enumerator_tools (1.1.0)
stringio (3.0.6)
temple (0.10.0)
thor (1.2.1)
tilt (2.1.0)
sorted_set (1.0.3)
rbtree
set (~> 1.0)
stringio (3.1.0)
temple (0.10.3)
tilt (2.3.0)
tty-color (0.6.0)
tty-command (0.10.1)
pastel (~> 0.8)
Expand All @@ -135,22 +140,22 @@ GEM
rexml (~> 3.2)
webrick (1.8.1)
yuicompressor (1.3.3)
zeitwerk (2.6.8)
zeitwerk (2.6.13)

PLATFORMS
ruby
x86_64-linux

DEPENDENCIES
adsf
builder
guard-nanoc
kramdown
nanoc (~> 4.12)
nanoc-dart-sass
nanoc-live
nokogiri
puma
rouge
ruby-xxHash
sass
slim
typogruby
w3c_validators
Expand All @@ -160,4 +165,4 @@ RUBY VERSION
ruby 3.0.5p211

BUNDLED WITH
2.3.26
2.5.4
8 changes: 0 additions & 8 deletions Guardfile

This file was deleted.

24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,35 @@ distclean: clean
rm -rf tmp/ .bundle bin vendor

dev:
bin/nanoc live_command
bin/nanoc live

# default installation
.bundle:
@[ -e .bundle ] || $(MAKE) install

define install_with_stubs
bundle install
@echo "Making gems available"
bundle binstubs --force nanoc
endef

bundler-env:
@echo "Configuring bundler environment"
bundle config set --local clean true
bundle config set --local path vendor/bundle

install: bundler-env
@echo "Installing only main gems, cleaning old gems"
@bundle config set --local without nanoc,test
bundle install
@echo "Making gems available"
bundle binstubs --force nanoc
@bundle config set --local without development,test
$(install_with_stubs)

install-devel: bundler-env
@echo "Installing all gems, cleaning old gems"
@bundle config unset --local without
bundle install
@echo "Making gems available"
bundle binstubs --force nanoc guard
$(install_with_stubs)

install-ci: bundler-env
@echo "Installing main and testing gems, cleaning old gems"
@bundle config set --local deployment true
@bundle config set --local without nanoc
bundle install
@echo "Making gems available"
bundle binstubs --force nanoc
@bundle config set --local without development
$(install_with_stubs)
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Source code of the EasyRPG homepage at https://easyrpg.org

## Requirements

- [ruby] >=2.5, version 3 is recommended
- [ruby] >=2.7, version 3 is recommended
- [nanoc] >=4.12
- [tidy-html5]
- [some gems]
Expand Down Expand Up @@ -36,10 +36,10 @@ Alternatively, you may run commands with prefix, i.e. `bin/nanoc`.

```bash
$ source helper.bash
$ nanoc # to build the page
$ guard # Automatically rebuild website on changes
$ nanoc view # Make website available at http://localhost:3000
$ nanoc live_command # Combination of last two commands
$ nanoc # to build the page
$ nanoc compile --watch # Automatically rebuild website on changes
$ nanoc view # Make website available at http://localhost:3000
$ nanoc live # Combination of last two commands
```

For convenience there is a `Makefile` provided:
Expand Down
4 changes: 2 additions & 2 deletions Rules
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ end
compile '/{css/*.scss,js/*.js}' do
ext = "." + item.identifier.ext
if ext == '.scss'
filter :sass, {
filter :dart_sass, {
:syntax => :scss,
:style => (@config[:prod] ? :compressed : :compact)
:style => (@config[:prod] ? :compressed : :expanded)
}
ext = ".css"
end
Expand Down
4 changes: 3 additions & 1 deletion content/css/vendor/magnific-popup.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*! Magnific Popup CSS */

@use "sass:math";

////////////////////////
//
// Contents:
Expand Down Expand Up @@ -52,7 +54,7 @@ $mfp-include-iframe-type: true !default; // En
$mfp-iframe-padding-top: 40px !default; // Iframe padding top
$mfp-iframe-background: #000 !default; // Background color of iframes
$mfp-iframe-max-width: 900px !default; // Maximum width of iframes
$mfp-iframe-ratio: 9/16 !default; // Ratio of iframe (9/16 = widescreen, 3/4 = standard, etc.)
$mfp-iframe-ratio: math.div(9, 16) !default; // Ratio of iframe (9/16 = widescreen, 3/4 = standard, etc.)

// Image-type options
$mfp-include-image-type: true !default; // Enable Image-type popups
Expand Down
2 changes: 1 addition & 1 deletion layouts/default.slim
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ html lang="en"
== yield
#footer
a href="/about/website"
| © 2007-#{Date.today.year} The EasyRPG project. Some rights reserved.
| © 2007-#{Date.today.year} EasyRPG Team. Some rights reserved.
Loading

0 comments on commit 0b9bcf1

Please sign in to comment.