diff --git a/404.html b/404.html index 28955293..02c0b39f 100644 --- a/404.html +++ b/404.html @@ -2,7 +2,8 @@ layout: main title: Page Not Found --- - -

The page you tried to access does not exist on this server. Please let us know what page you linked from and the URL that failed.

+

Page Not Found

-

Hmm...

+

We couldn't find the page you were looking for.

+ +

If a link brought you here, please report it on our issue tracker.

diff --git a/README.markdown b/README.markdown index 535ccff3..ac9b8cab 100644 --- a/README.markdown +++ b/README.markdown @@ -24,6 +24,9 @@ The site is generated with Jekyll, and while you can use the regular It also emulates Jekyll's `--auto` mode so that files are refreshed as you save changes to them. + To test link previews through a tunnel such as ngrok, set its hostname: + `PREVIEW_DOMAIN=example.ngrok-free.app rake server` + # Contributing If you wish to contribute content updates for jruby.org, please fork, diff --git a/Rakefile b/Rakefile index 8e7a6393..d20f5982 100644 --- a/Rakefile +++ b/Rakefile @@ -26,6 +26,27 @@ task :deploy => [:generate] do sh "tar -C _site/ -zcf - . | ssh deploy@jruby.org 'cd /data/jruby.org && tar zxf -'" end +namespace :deploy do + desc 'Deploy the site to the Spindle staging site (needs SPINDLE_API_KEY and SPINDLE_SLUG)' + task :staging do + api_key = ENV['SPINDLE_API_KEY'] || fail('No SPINDLE_API_KEY env set') + slug = ENV['SPINDLE_SLUG'] || fail('No SPINDLE_SLUG env set') + api_url = ENV.fetch('SPINDLE_API_URL', 'https://stats.fascinationworks.com') + + ruby '-S bundle exec jekyll build' + + require 'tmpdir' + Dir.mktmpdir do |dir| + archive = File.join(dir, 'dist.tar.gz') + sh 'tar', '-czf', archive, '-C', '_site', '.' + sh 'curl', '-fsS', '-H', "Authorization: Bearer #{api_key}", '-F', "archive=@#{archive}", + "#{api_url}/api/v1/sites/#{slug}/deployments", verbose: false do |ok, status| + ok or fail "Spindle deploy failed (curl exit #{status.exitstatus})" + end + end + end +end + desc 'Deploy jruby.org config changes' task :cookbooks do Bundler.with_clean_env do diff --git a/_config.yml b/_config.yml index 3aafd9c7..4bff1d83 100644 --- a/_config.yml +++ b/_config.yml @@ -24,5 +24,25 @@ urls: wiki: https://github.com/jruby/jruby/wiki lists: https://github.com/jruby/jruby/wiki/MailingLists github: https://github.com/jruby/jruby + matrix: "https://matrix.to/#/#jruby:matrix.org" team_email: team@jruby.org domain: www.jruby.org +tagline: The Ruby Programming Language on the JVM +description: JRuby is a high performance, stable, fully threaded Java implementation of the Ruby programming language. + +# Drives download.html. rake's change_versions_in rewrites the versions here on +# release; dates and release-notes links come from the matching post. Sizes are +# approximate and are not updated automatically. +releases: + - version: "10.1.3.0" + ruby_version: "4.0" + description: "Our latest point release of Ruby 4.0 support." + sizes: { tar: "~46MB", zip: "~51MB", exe64: "~107MB", exe: "~106MB", src: "~13MB", jar: "~46MB" } + - version: "10.0.8.0" + ruby_version: "3.4" + description: "Stable Ruby 3.4 support release." + sizes: { tar: "~36MB", zip: "~42MB", exe64: "~86MB", exe: "~86MB", src: "~15MB", jar: "~36MB" } + - version: "9.4.15.0" + ruby_version: "3.1" + description: "Latest Ruby 3.1 maintenance release." + sizes: { tar: "~31MB", zip: "~32MB", exe64: "~64MB", exe: "~64MB", src: "~13MB", jar: "~33MB" } diff --git a/_includes/banner.html b/_includes/banner.html deleted file mode 100644 index a96d66ce..00000000 --- a/_includes/banner.html +++ /dev/null @@ -1,2 +0,0 @@ -

JRuby

-

The Ruby Programming Language on the JVM

diff --git a/_includes/download_row.html b/_includes/download_row.html new file mode 100644 index 00000000..667426f3 --- /dev/null +++ b/_includes/download_row.html @@ -0,0 +1,5 @@ + + {{ include.label }} + {{ include.size }} + {% if include.sha256 %}SHA256{% endif %} + diff --git a/_includes/footer.html b/_includes/footer.html index e69de29b..862fb4d1 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -0,0 +1,43 @@ + diff --git a/_includes/head.html b/_includes/head.html index 25796332..2adc15b6 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -1,5 +1,54 @@ - {{ page.title }} — JRuby.org + + {%- assign page_title = page.title -%} + {%- assign page_description = page.description -%} + {%- if page.url contains "/files/downloads/" -%} + {%- if page.title == "Files/downloads" -%} + {%- assign page_title = "All JRuby Releases" -%} + {%- assign page_description = "Download files and checksums for every JRuby release." -%} + {%- else -%} + {%- assign release_name = page.title | replace: "Files/downloads/", "JRuby " -%} + {%- assign page_title = release_name | append: " Downloads" -%} + {%- assign page_description = "Download files and checksums for " | append: release_name | append: "." -%} + {%- endif -%} + {%- endif -%} + {%- assign share_title = page_title -%} + {%- if page.layout == "home" -%}{%- assign share_title = "JRuby: " | append: site.tagline -%}{%- endif -%} + {%- unless share_title contains "JRuby" -%}{%- assign share_title = share_title | append: " | JRuby" -%}{%- endunless -%} + {%- assign share_description = page_description | default: page.excerpt | default: site.description | strip_html | strip_newlines | strip | truncate: 200 | escape -%} + {%- assign share_url = "https://" | append: site.domain | append: page.url | replace: "index.html", "" | replace: ".html", "" %} + {%- if page.layout == "home" %} + {{ share_title | escape }} + {%- else %} + {{ page_title | escape }} — JRuby.org + {%- endif %} + + {%- unless page.url == "/404.html" %} + + {%- endunless %} + + + + + + + + + + + {%- if page.layout == "post" %} + + + {%- else %} + + {%- endif %} + + + {%- if page.layout == "home" %} + + {%- elsif page.layout == "post" %} + + {%- endif %} @@ -8,11 +57,7 @@ - + - - - - - - + + diff --git a/_includes/menu.html b/_includes/menu.html index 275bbca4..7a4d4c61 100644 --- a/_includes/menu.html +++ b/_includes/menu.html @@ -1,35 +1,24 @@ -