Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure a Jekyll-powered documentation site similar to Ruby LSP's #2180

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish docs

on:
push:
branches: [main]
paths:
- 'jekyll/**'
- '.github/workflows/publish_docs.yml'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
if: github.repository == 'Shopify/tapioca'
name: Publish documentation website
steps:
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
working-directory: ./jekyll

- name: Configure git
run: |
git config user.name github-actions
git config user.email [email protected]

- name: Generate documentation
working-directory: ./jekyll
run: bundle exec jekyll build

- name: Commit to gh-pages
run: |
git add docs -f
git commit -m "Publish website $(git log --format=format:%h -1)"
git push --force origin main:gh-pages
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/.yardoc
/_yardoc/
/coverage/
/doc/
/docs/
/pkg/
/spec/dummy/log/
/spec/dummy/tmp/
Expand Down
5 changes: 5 additions & 0 deletions jekyll/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
_site
.sass-cache
.jekyll-cache
.jekyll-metadata
vendor
25 changes: 25 additions & 0 deletions jekyll/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
permalink: /404.html
layout: page
---

<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>

<div class="container">
<h1>404</h1>

<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
</div>
13 changes: 13 additions & 0 deletions jekyll/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

source "https://rubygems.org"

# We only need to use Jekyll with CRuby
gem "jekyll", "~> 4.4.1"
gem "jekyll-feed", "~> 0.12"

# Theme
gem "just-the-docs", "~> 0.10.0"

gem "csv"
gem "base64"
176 changes: 176 additions & 0 deletions jekyll/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
base64 (0.2.0)
bigdecimal (3.1.9)
colorator (1.1.0)
concurrent-ruby (1.3.5)
csv (3.3.2)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.17.1)
ffi (1.17.1-aarch64-linux-gnu)
ffi (1.17.1-aarch64-linux-musl)
ffi (1.17.1-arm-linux-gnu)
ffi (1.17.1-arm-linux-musl)
ffi (1.17.1-arm64-darwin)
ffi (1.17.1-x86-linux-gnu)
ffi (1.17.1-x86-linux-musl)
ffi (1.17.1-x86_64-darwin)
ffi (1.17.1-x86_64-linux-gnu)
ffi (1.17.1-x86_64-linux-musl)
forwardable-extended (2.6.0)
google-protobuf (4.29.3)
bigdecimal
rake (>= 13)
google-protobuf (4.29.3-aarch64-linux)
bigdecimal
rake (>= 13)
google-protobuf (4.29.3-arm64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.29.3-x86-linux)
bigdecimal
rake (>= 13)
google-protobuf (4.29.3-x86_64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.29.3-x86_64-linux)
bigdecimal
rake (>= 13)
http_parser.rb (0.8.0)
i18n (1.14.7)
concurrent-ruby (~> 1.0)
jekyll (4.4.1)
addressable (~> 2.4)
base64 (~> 0.2)
colorator (~> 1.0)
csv (~> 3.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (>= 2.0, < 4.0)
jekyll-watch (~> 2.0)
json (~> 2.6)
kramdown (~> 2.3, >= 2.3.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.3, >= 0.3.6)
pathutil (~> 0.9)
rouge (>= 3.0, < 5.0)
safe_yaml (~> 1.0)
terminal-table (>= 1.8, < 4.0)
webrick (~> 1.7)
jekyll-feed (0.17.0)
jekyll (>= 3.7, < 5.0)
jekyll-include-cache (0.2.1)
jekyll (>= 3.7, < 5.0)
jekyll-sass-converter (3.1.0)
sass-embedded (~> 1.75)
jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
json (2.9.1)
just-the-docs (0.10.1)
jekyll (>= 3.8.5)
jekyll-include-cache
jekyll-seo-tag (>= 2.0)
rake (>= 12.3.1)
kramdown (2.5.1)
rexml (>= 3.3.9)
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.4)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (6.0.1)
rake (13.2.1)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rexml (3.4.0)
rouge (4.5.1)
safe_yaml (1.0.5)
sass-embedded (1.83.4)
google-protobuf (~> 4.29)
rake (>= 13)
sass-embedded (1.83.4-aarch64-linux-android)
google-protobuf (~> 4.29)
sass-embedded (1.83.4-aarch64-linux-gnu)
google-protobuf (~> 4.29)
sass-embedded (1.83.4-aarch64-linux-musl)
google-protobuf (~> 4.29)
sass-embedded (1.83.4-aarch64-mingw-ucrt)
google-protobuf (~> 4.29)
sass-embedded (1.83.4-arm-linux-androideabi)
google-protobuf (~> 4.29)
sass-embedded (1.83.4-arm-linux-gnueabihf)
google-protobuf (~> 4.29)
sass-embedded (1.83.4-arm-linux-musleabihf)
google-protobuf (~> 4.29)
sass-embedded (1.83.4-arm64-darwin)
google-protobuf (~> 4.29)
sass-embedded (1.83.4-riscv64-linux-android)
google-protobuf (~> 4.29)
sass-embedded (1.83.4-riscv64-linux-gnu)
google-protobuf (~> 4.29)
sass-embedded (1.83.4-riscv64-linux-musl)
google-protobuf (~> 4.29)
sass-embedded (1.83.4-x86_64-cygwin)
google-protobuf (~> 4.29)
sass-embedded (1.83.4-x86_64-darwin)
google-protobuf (~> 4.29)
sass-embedded (1.83.4-x86_64-linux-android)
google-protobuf (~> 4.29)
sass-embedded (1.83.4-x86_64-linux-gnu)
google-protobuf (~> 4.29)
sass-embedded (1.83.4-x86_64-linux-musl)
google-protobuf (~> 4.29)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.6.0)
webrick (1.9.1)

PLATFORMS
aarch64-linux
aarch64-linux-android
aarch64-linux-gnu
aarch64-linux-musl
aarch64-mingw-ucrt
arm-linux-androideabi
arm-linux-gnu
arm-linux-gnueabihf
arm-linux-musl
arm-linux-musleabihf
arm64-darwin
riscv64-linux-android
riscv64-linux-gnu
riscv64-linux-musl
ruby
x86-linux
x86-linux-gnu
x86-linux-musl
x86_64-cygwin
x86_64-darwin
x86_64-linux
x86_64-linux-android
x86_64-linux-gnu
x86_64-linux-musl

DEPENDENCIES
base64
csv
jekyll (~> 4.4.1)
jekyll-feed (~> 0.12)
just-the-docs (~> 0.10.0)

BUNDLED WITH
2.6.2
30 changes: 30 additions & 0 deletions jekyll/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
title: Tapioca
description: >-
The swiss army knife of RBI generation
baseurl: "/tapioca"
url: "https://shopify.github.io"
github_username: shopify

defaults:
- scope:
path: ""
values:
image: /tapioca-logo.svg

aux_links:
"Report an Issue":
- "https://github.com/Shopify/tapioca/issues/new"
nav_external_links:
- title: "Tapioca on GitHub"
url: "https://github.com/Shopify/tapioca"
opens_in_new_tab: true
- title: "Sorbet.org"
url: "https://sorbet.org"
opens_in_new_tab: true

theme: just-the-docs
layout: minimal
plugins:
- jekyll-feed
- jekyll-seo-tag
destination: ../docs
29 changes: 29 additions & 0 deletions jekyll/_posts/2025-02-02-welcome-to-jekyll.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
layout: post
title: "Welcome to Jekyll!"
date: 2025-02-02 22:21:28 +0000
categories: jekyll update
---
You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.

Jekyll requires blog post files to be named according to the following format:

`YEAR-MONTH-DAY-title.MARKUP`

Where `YEAR` is a four-digit number, `MONTH` and `DAY` are both two-digit numbers, and `MARKUP` is the file extension representing the format used in the file. After that, include the necessary front matter. Take a look at the source for this post to get an idea about how it works.

Jekyll also offers powerful support for code snippets:

{% highlight ruby %}
def print_hi(name)
puts "Hi, #{name}"
end
print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
{% endhighlight %}

Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk].

[jekyll-docs]: https://jekyllrb.com/docs/home
[jekyll-gh]: https://github.com/jekyll/jekyll
[jekyll-talk]: https://talk.jekyllrb.com/
Loading
Loading