diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 698c1be979..9ce167f26a 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -2,8 +2,7 @@ name: Build and verify
on:
pull_request:
push:
- branches:
- - 'master'
+ branches: [$default-branch]
permissions:
contents: read
jobs:
diff --git a/.github/workflows/deploy-website.yaml b/.github/workflows/deploy-website.yaml
new file mode 100644
index 0000000000..6582744284
--- /dev/null
+++ b/.github/workflows/deploy-website.yaml
@@ -0,0 +1,45 @@
+name: Update `error-prone.picnic.tech` website content
+on:
+ pull_request:
+ push:
+ branches: [$default-branch]
+permissions:
+ contents: read
+ id-token: write
+ pages: write
+concurrency:
+ group: pages
+ cancel-in-progress: true
+jobs:
+ build:
+ runs-on: ubuntu-22.04
+ steps:
+ - name: Check out code
+ uses: actions/checkout@v3.0.2
+ - name: Configure Github Pages
+ uses: actions/configure-pages@v2.1.1
+ - name: Generate documentation
+ run: ./generate-docs.sh
+ - name: Build website with Jekyll
+ uses: actions/jekyll-build-pages@v1.0.5
+ with:
+ source: website/
+ destination: ./_site
+ - name: Validate HTML output
+ uses: anishathalye/proof-html@v1.4.1
+ with:
+ directory: ./_site
+ check_external_hash: false
+ - name: Upload website as artifact
+ uses: actions/upload-pages-artifact@v1.0.4
+ deploy:
+ if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
+ needs: build
+ runs-on: ubuntu-22.04
+ environment:
+ name: github-pages
+ url: ${{ steps.deployment.outputs.page_url }}
+ steps:
+ - name: Deploy to GitHub Pages
+ id: deployment
+ uses: actions/deploy-pages@v1.2.1
diff --git a/README.md b/README.md
index 97e6ff8dfd..1172690474 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,10 @@
-
-
+
+
# Error Prone Support
@@ -24,8 +24,6 @@ focussing on maintainability, consistency and avoidance of common pitfalls.
[Developing Error Prone Support](#-developing-error-prone-support) •
[How it works](#-how-it-works) • [Contributing](#%EF%B8%8F-contributing)
-
-
---
## ⚡ Getting started
@@ -201,9 +199,9 @@ Want to report or fix a bug, suggest or add a new feature, or improve the
documentation? That's awesome! Please read our [contribution
guidelines][contributing].
-[bug-checks]: error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/
-[bug-checks-identity-conversion]: error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/IdentityConversion.java
-[contributing]: CONTRIBUTING.md
+[bug-checks]: https://github.com/PicnicSupermarket/error-prone-support/blob/master/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/
+[bug-checks-identity-conversion]: https://github.com/PicnicSupermarket/error-prone-support/blob/master/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/IdentityConversion.java
+[contributing]: https://github.com/PicnicSupermarket/error-prone-support/blob/master/CONTRIBUTING.md
[error-prone-bugchecker]: https://github.com/google/error-prone/blob/master/check_api/src/main/java/com/google/errorprone/bugpatterns/BugChecker.java
[error-prone-fork-jitpack]: https://jitpack.io/#PicnicSupermarket/error-prone
[error-prone-fork-repo]: https://github.com/PicnicSupermarket/error-prone
@@ -215,7 +213,7 @@ guidelines][contributing].
[google-java-format]: https://github.com/google/google-java-format
[idea-288052]: https://youtrack.jetbrains.com/issue/IDEA-288052
[license-badge]: https://img.shields.io/github/license/PicnicSupermarket/error-prone-support
-[license]: LICENSE.md
+[license]: https://github.com/PicnicSupermarket/error-prone-support/blob/master/LICENSE.md
[maven-central-badge]: https://img.shields.io/maven-central/v/tech.picnic.error-prone-support/error-prone-support?color=blue
[maven-central-search]: https://search.maven.org/artifact/tech.picnic.error-prone-support/error-prone-support
[maven]: https://maven.apache.org
@@ -224,5 +222,5 @@ guidelines][contributing].
[pitest-maven]: https://pitest.org/quickstart/maven
[pr-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg
[refaster]: https://errorprone.info/docs/refaster
-[refaster-templates-bigdecimal]: error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/BigDecimalTemplates.java
-[refaster-templates]: error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/
+[refaster-templates-bigdecimal]: https://github.com/PicnicSupermarket/error-prone-support/blob/master/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/BigDecimalTemplates.java
+[refaster-templates]: https://github.com/PicnicSupermarket/error-prone-support/blob/master/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/
diff --git a/generate-docs.sh b/generate-docs.sh
new file mode 100755
index 0000000000..0eaa911ee2
--- /dev/null
+++ b/generate-docs.sh
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+set -e -u -o pipefail
+
+REPOSIORY_ROOT="$(git rev-parse --show-toplevel)"
+WEBSITE_ROOT="${REPOSIORY_ROOT}/website"
+
+generate_homepage() {
+ local homepage="${WEBSITE_ROOT}/index.md"
+
+ echo "Generating ${homepage}..."
+ cat - "${REPOSIORY_ROOT}/README.md" > "${homepage}" << EOF
+---
+layout: default
+title: Home
+nav_order: 1
+---
+EOF
+
+ local macos_compat=""
+ [[ "${OSTYPE}" == "darwin"* ]] && macos_compat="yes"
+ sed -i ${macos_compat:+".bak"} 's/src="website\//src="/g' "${homepage}"
+ sed -i ${macos_compat:+".bak"} 's/srcset="website\//srcset="/g' "${homepage}"
+}
+
+# Generate the website.
+generate_homepage
diff --git a/website/.gitignore b/website/.gitignore
new file mode 100644
index 0000000000..7caf6d3d38
--- /dev/null
+++ b/website/.gitignore
@@ -0,0 +1,12 @@
+# Generated by Bundler and Jekyll.
+.bundle/
+Gemfile.lock
+.jekyll-cache/
+.jekyll-metadata
+.sass-cache/
+_site/
+vendor/
+
+# Generated by `../generate-docs.sh`.
+*.bak
+index.md
diff --git a/website/404.md b/website/404.md
new file mode 100644
index 0000000000..7c813c73e1
--- /dev/null
+++ b/website/404.md
@@ -0,0 +1,11 @@
+---
+layout: default
+title: Page not found
+permalink: /404
+nav_exclude: true
+search_exclude: true
+---
+
+## Page not found :(
+
+The requested page could not be found.
diff --git a/website/Gemfile b/website/Gemfile
new file mode 100644
index 0000000000..cdeed141c6
--- /dev/null
+++ b/website/Gemfile
@@ -0,0 +1,5 @@
+source "https://rubygems.org"
+gem "github-pages", "227"
+gem "html-proofer", "4.4.1"
+gem "jekyll-remote-theme", "0.4.3"
+gem "rake", "13.0.6"
diff --git a/website/README.md b/website/README.md
new file mode 100644
index 0000000000..b1d8674559
--- /dev/null
+++ b/website/README.md
@@ -0,0 +1,38 @@
+# Error Prone Support website
+
+This directory contains the majority of the source code that powers
+[error-prone.picnic.tech][error-prone-support-website]. The website is
+statically generated using [Jekyll][jekyll].
+
+# Local development
+
+To view the website on `localhost`, first follow the [Jekyll installation
+instructions][jekyll-docs-installation]. Once done, in this directory execute:
+
+```sh
+bundle install
+../generate-docs.sh && bundle exec jekyll serve --livereload
+```
+
+The website will now be [available][localhost-port-4000] on port 4000. Source
+code modifications (including the result of rerunning `../generate-docs.sh`)
+will automatically be reflected. (An exception is `_config.yml`: changes to
+this file require a server restart.) Subsequent server restarts do not require
+running `bundle install`, unless `Gemfile` has been updated in the interim.
+
+If you are not familiar with Jekyll, be sure to check out its
+[documentation][jekyll-docs]. It is recommended to follow the provided
+step-by-step tutorial.
+
+# Deployment
+
+The website is regenerated and deployed using the
+[`deploy-website.yaml`][error-prone-support-website-deploy-workflow] GitHub
+Actions workflow any time a change is merged to `master`.
+
+[error-prone-support-website]: https://error-prone.picnic.tech
+[error-prone-support-website-deploy-workflow]: https://github.com/PicnicSupermarket/error-prone-support/actions/workflows/deploy-website.yaml
+[jekyll]: https://jekyllrb.com
+[jekyll-docs]: https://jekyllrb.com/docs/
+[jekyll-docs-installation]: https://jekyllrb.com/docs/installation/
+[localhost-port-4000]: http://127.0.0.1:4000
diff --git a/website/_config.yml b/website/_config.yml
new file mode 100644
index 0000000000..002a30563d
--- /dev/null
+++ b/website/_config.yml
@@ -0,0 +1,46 @@
+# General configuration.
+title: Error Prone Support
+logo: assets/images/favicon.svg
+url: https://error-prone.picnic.tech
+description: >-
+ Error Prone extensions: extra bug checkers and a large battery of Refaster
+ templates.
+
+# XXX: Investigate dropping the remote theme by instead managing just-the-docs
+# using Bundler. This requires changes to the build setup. The upshot is that
+# local and CI build environments would then be in sync.
+# https://github.com/PicnicSupermarket/error-prone-support/pull/253#discussion_r982709523
+remote_theme: just-the-docs/just-the-docs@v0.4.0.rc2
+plugins:
+ - jekyll-remote-theme
+ - jekyll-sitemap
+
+# Files and directories not to be deployed through GitHub pages.
+exclude:
+ - Gemfile
+ - Gemfile.lock
+ - README.md
+ - vendor
+
+# See https://jekyllrb.com/docs/permalinks/#built-in-formats.
+permalink: pretty
+
+# Theme (just-the-docs) configuration.
+# See
+# https://just-the-docs.github.io/just-the-docs/docs/navigation-structure/#external-navigation-links.
+nav_external_links:
+ - title: Error Prone Support on GitHub
+ url: https://github.com/PicnicSupermarket/error-prone-support
+ hide_icon: false
+
+# SEO configuration.
+# See https://jekyll.github.io/jekyll-seo-tag/usage.
+social:
+ name: Picnic
+ links:
+ - https://github.com/PicnicSupermarket
+ - https://twitter.com/picnic
+ - https://www.linkedin.com/company/picnictechnologies
+twitter:
+ username: picnic
+ card: summary
diff --git a/website/_includes/footer_custom.html b/website/_includes/footer_custom.html
new file mode 100644
index 0000000000..156df3e228
--- /dev/null
+++ b/website/_includes/footer_custom.html
@@ -0,0 +1,5 @@
+
+
+
+ Copyright © 2017-2022 Picnic Technologies BV
+
diff --git a/website/_includes/head_custom.html b/website/_includes/head_custom.html
new file mode 100644
index 0000000000..598920041f
--- /dev/null
+++ b/website/_includes/head_custom.html
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/website/_sass/custom/custom.scss b/website/_sass/custom/custom.scss
new file mode 100644
index 0000000000..cff65e8ac6
--- /dev/null
+++ b/website/_sass/custom/custom.scss
@@ -0,0 +1,21 @@
+// XXX: We should override `$nav-width(-md)`, but this breaks code highlighting
+// and other styles. See
+// https://github.com/just-the-docs/just-the-docs/issues/982.
+// Once the fix for the above issue is released, replace this section with the
+// approach recommended at
+// https://just-the-docs.github.io/just-the-docs/docs/customization/#custom-schemes.
+@include mq(lg) {
+ .side-bar {
+ min-width: 400px;
+ }
+
+ .site-nav, .site-header {
+ width: 400px;
+ }
+}
+
+footer > img#logo {
+ width: 2rem;
+ margin: 0 auto;
+ display: block;
+}
diff --git a/website/assets/images/android-chrome-192x192.png b/website/assets/images/android-chrome-192x192.png
new file mode 100644
index 0000000000..3a32c1dbf1
Binary files /dev/null and b/website/assets/images/android-chrome-192x192.png differ
diff --git a/website/assets/images/android-chrome-512x512.png b/website/assets/images/android-chrome-512x512.png
new file mode 100644
index 0000000000..6772eb1a8c
Binary files /dev/null and b/website/assets/images/android-chrome-512x512.png differ
diff --git a/website/assets/images/apple-touch-icon.png b/website/assets/images/apple-touch-icon.png
new file mode 100644
index 0000000000..60d51edbe0
Binary files /dev/null and b/website/assets/images/apple-touch-icon.png differ
diff --git a/website/assets/images/browserconfig.xml b/website/assets/images/browserconfig.xml
new file mode 100644
index 0000000000..33c7d68ae6
--- /dev/null
+++ b/website/assets/images/browserconfig.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+ #da532c
+
+
+
diff --git a/website/assets/images/favicon-16x16.png b/website/assets/images/favicon-16x16.png
new file mode 100644
index 0000000000..1b2269687d
Binary files /dev/null and b/website/assets/images/favicon-16x16.png differ
diff --git a/website/assets/images/favicon-32x32.png b/website/assets/images/favicon-32x32.png
new file mode 100644
index 0000000000..53edf1f91f
Binary files /dev/null and b/website/assets/images/favicon-32x32.png differ
diff --git a/website/assets/images/favicon.svg b/website/assets/images/favicon.svg
new file mode 100755
index 0000000000..f9d07b01d8
--- /dev/null
+++ b/website/assets/images/favicon.svg
@@ -0,0 +1,33 @@
+
diff --git a/logo-dark.svg b/website/assets/images/logo-dark.svg
similarity index 100%
rename from logo-dark.svg
rename to website/assets/images/logo-dark.svg
diff --git a/logo.svg b/website/assets/images/logo.svg
similarity index 100%
rename from logo.svg
rename to website/assets/images/logo.svg
diff --git a/website/assets/images/mstile-150x150.png b/website/assets/images/mstile-150x150.png
new file mode 100644
index 0000000000..622c69de3e
Binary files /dev/null and b/website/assets/images/mstile-150x150.png differ
diff --git a/website/assets/images/picnic-logo@2x.png b/website/assets/images/picnic-logo@2x.png
new file mode 100644
index 0000000000..36d7ae3a46
Binary files /dev/null and b/website/assets/images/picnic-logo@2x.png differ
diff --git a/website/assets/images/safari-pinned-tab.svg b/website/assets/images/safari-pinned-tab.svg
new file mode 100644
index 0000000000..c8a61fcc19
--- /dev/null
+++ b/website/assets/images/safari-pinned-tab.svg
@@ -0,0 +1,88 @@
+
+
+
diff --git a/website/assets/images/site.webmanifest b/website/assets/images/site.webmanifest
new file mode 100644
index 0000000000..afefb76961
--- /dev/null
+++ b/website/assets/images/site.webmanifest
@@ -0,0 +1,19 @@
+{
+ "name": "Error Prone Support documentation",
+ "short_name": "Error Prone Support",
+ "icons": [
+ {
+ "src": "/assets/images/android-chrome-192x192.png",
+ "sizes": "192x192",
+ "type": "image/png"
+ },
+ {
+ "src": "/assets/images/android-chrome-512x512.png",
+ "sizes": "512x512",
+ "type": "image/png"
+ }
+ ],
+ "theme_color": "#ffffff",
+ "background_color": "#ffffff",
+ "display": "standalone"
+}
diff --git a/website/bugpatterns.md b/website/bugpatterns.md
new file mode 100644
index 0000000000..51ce7bf7da
--- /dev/null
+++ b/website/bugpatterns.md
@@ -0,0 +1,8 @@
+---
+layout: default
+title: Bug Patterns
+nav_order: 2
+has_children: true
+---
+
+# Bug Patterns
diff --git a/website/favicon.ico b/website/favicon.ico
new file mode 100644
index 0000000000..d18fc0980e
Binary files /dev/null and b/website/favicon.ico differ
diff --git a/website/refastertemplates.md b/website/refastertemplates.md
new file mode 100644
index 0000000000..66cecf9001
--- /dev/null
+++ b/website/refastertemplates.md
@@ -0,0 +1,8 @@
+---
+layout: default
+title: Refaster templates
+nav_order: 2
+has_children: true
+---
+
+# Refaster templates