Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/docgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout website
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Checkout WurstStdlib2
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
repository: wurstscript/WurstStdlib2
ref: master
Expand All @@ -41,7 +41,7 @@ jobs:
run: deno task gen --src "$GITHUB_WORKSPACE/_stdlib/wurst" --out "$GITHUB_WORKSPACE"

- name: Open pull request
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: auto/stdlib-docgen
Expand Down
64 changes: 50 additions & 14 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
name: Build and deploy site

# Builds the Jekyll site, generates the Pagefind search index from the *built*
# site, and deploys the result to GitHub Pages. Because the index is generated
# here on every deploy, it can never drift out of sync with the content (which
# is what happened when the index was hand-committed into the repo).
# Builds and verifies every pull request. Pushes to master are additionally
# deployed to GitHub Pages. PR builds are retained as downloadable preview
# artifacts so proposed changes can be tested locally before merging.
#
# Requires repo Settings -> Pages -> "Build and deployment" -> Source = "GitHub Actions".

on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

# Allow one in-flight deploy at a time; let a running deploy finish rather than
# cancelling it (cancelling a half-published deploy can leave Pages inconsistent).
concurrency:
group: pages
cancel-in-progress: false
group: pages-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
build:
Expand All @@ -30,7 +27,7 @@ jobs:
JEKYLL_ENV: production
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand All @@ -39,27 +36,66 @@ jobs:
bundler-cache: true

- name: Set up Node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: "20"
node-version: "24"

- name: Install frontend dependencies
run: npm ci

- name: Verify vendored frontend assets
run: |
npm run vendor:frontend
git diff --exit-code -- assets/plugins

- name: Build site
run: bundle exec jekyll build

- name: Verify built dependency assets
run: npm test

- name: Generate Pagefind search index
run: npx -y pagefind@1.5.2 --site _site

- name: Verify search index exists
run: test -f _site/pagefind/pagefind.js && test -f _site/pagefind/pagefind-entry.json

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v4
with:
path: _site

- name: Upload PR preview
if: github.event_name == 'pull_request'
id: preview
uses: actions/upload-artifact@v7
with:
name: site-preview-pr-${{ github.event.pull_request.number }}
path: _site
retention-days: 7

- name: Add PR preview instructions
if: github.event_name == 'pull_request'
run: |
{
echo "### Site preview"
echo
echo "Download [site-preview-pr-${{ github.event.pull_request.number }}](${{ steps.preview.outputs.artifact-url }}), extract it, then serve the directory locally:"
echo
echo '```shell'
echo 'python -m http.server 4000'
echo '```'
} >> "$GITHUB_STEP_SUMMARY"

deploy:
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ _stdlib
# Pagefind search index is generated by CI (.github/workflows/pages.yml) on
# every deploy. Never commit it — a hand-committed index drifts out of sync
# with the content and breaks search.
pagefind/
pagefind/
node_modules/
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source "https://rubygems.org"

gem "jekyll", ">= 4.4.1"
gem 'wdm', '>= 0.2.0' if Gem.win_platform?
gem "wdm", ">= 0.2.0", platforms: :windows

group :jekyll_plugins do
gem 'jekyll-seo-tag'
Expand Down
29 changes: 15 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,25 @@ GEM
addressable (2.9.0)
public_suffix (>= 2.0.2, < 8.0)
base64 (0.3.0)
bigdecimal (4.0.1)
bigdecimal (4.1.2)
colorator (1.1.0)
concurrent-ruby (1.3.7)
csv (3.3.5)
concurrent-ruby (1.3.8)
csv (3.3.6)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.17.3)
ffi (1.17.3-x64-mingw-ucrt)
ffi (1.17.3-x86_64-linux-gnu)
ffi (1.17.4-x64-mingw-ucrt)
ffi (1.17.4-x86_64-linux-gnu)
forwardable-extended (2.6.0)
google-protobuf (4.34.0-x64-mingw-ucrt)
google-protobuf (4.35.1-x64-mingw-ucrt)
bigdecimal
rake (~> 13.3)
google-protobuf (4.34.0-x86_64-linux-gnu)
google-protobuf (4.35.1-x86_64-linux-gnu)
bigdecimal
rake (~> 13.3)
http_parser.rb (0.8.1)
i18n (1.14.8)
i18n (1.15.2)
concurrent-ruby (~> 1.0)
jekyll (4.4.1)
addressable (~> 2.4)
Expand All @@ -48,13 +47,13 @@ GEM
jekyll (>= 3.3, < 5.0)
jekyll-sass-converter (3.1.0)
sass-embedded (~> 1.75)
jekyll-seo-tag (2.8.0)
jekyll-seo-tag (2.9.0)
jekyll (>= 3.8, < 5.0)
jekyll-sitemap (1.4.0)
jekyll (>= 3.7, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
json (2.19.9)
json (2.21.1)
kramdown (2.5.2)
rexml (>= 3.4.4)
kramdown-parser-gfm (1.1.0)
Expand All @@ -69,20 +68,21 @@ GEM
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (7.0.5)
rake (13.3.1)
rake (13.4.2)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rexml (3.4.4)
rouge (4.7.0)
safe_yaml (1.0.5)
sass-embedded (1.97.3-x64-mingw-ucrt)
sass-embedded (1.102.0-x64-mingw-ucrt)
google-protobuf (~> 4.31)
sass-embedded (1.97.3-x86_64-linux-gnu)
sass-embedded (1.102.0-x86_64-linux-gnu)
google-protobuf (~> 4.31)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.6.0)
wdm (0.2.0)
webrick (1.9.2)

PLATFORMS
Expand All @@ -94,6 +94,7 @@ DEPENDENCIES
jekyll-redirect-from
jekyll-seo-tag
jekyll-sitemap
wdm (>= 0.2.0)

BUNDLED WITH
4.0.7
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ This folder contains the complete source of the WurstScript website, configured

We use Sass as stylesheet language and you can find the files inside the `_sass` folder.

Bootstrap, Font Awesome, and Prism are managed through `package.json`. After
updating them, refresh the checked-in browser assets with:

```shell
npm install
npm run vendor:frontend
```

Do not edit files under `assets/plugins/bootstrap`, `assets/plugins/font-awesome`,
or `assets/plugins/prism` by hand.

## Tutorials

Tutorials are included as part of the documentation in their own section.
Expand Down
13 changes: 6 additions & 7 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ plugins:
- jekyll-sitemap

exclude:
- vendor
- tools
- assets/plugins/elegant_font/css/index.html
- assets/plugins/jquery-match-height/test.html
- assets/plugins/jquery-scrollTo/demo
- assets/plugins/jquery-scrollTo/tests
- assets/plugins/lightbox/examples
- vendor
- tools
- node_modules
- package.json
- package-lock.json
- assets/plugins/elegant_font/css/index.html
repository: wurstscript/wurstscript.github.io
url: https://wurstlang.org
baseurl: ""
Expand Down
7 changes: 1 addition & 6 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@
</footer>


<script type="text/javascript" src="{{ '/assets/plugins/jquery-1.12.3.min.js' | prepend: site.baseurl }}"></script>
<script type="text/javascript" src="{{ '/assets/plugins/bootstrap/js/bootstrap.min.js' | prepend: site.baseurl }}"></script>
<script type="text/javascript" src="{{ '/assets/plugins/jquery-scrollTo/jquery.scrollTo.min.js' | prepend: site.baseurl }}"></script>
<script type="text/javascript" src="{{ '/assets/plugins/lightbox/dist/ekko-lightbox.min.js' | prepend: site.baseurl }}"></script>
<script type="text/javascript" src="{{ '/assets/plugins/jquery-match-height/jquery.matchHeight-min.js' | prepend: site.baseurl }}"></script>
<script type="text/javascript" src="{{ '/assets/plugins/prism/prism.min.js' | prepend: site.baseurl }}"></script>
<script type="text/javascript" src="{{ '/assets/plugins/prism/prism.js' | prepend: site.baseurl }}"></script>
<script type="text/javascript" src="{{ '/assets/js/wurst.js' | prepend: site.baseurl }}"></script>
<script type="text/javascript" src="{{ '/assets/js/search.js' | prepend: site.baseurl }}"></script>
<script type="text/javascript" src="{{ '/assets/js/main.js' | prepend: site.baseurl }}"></script>
Expand Down
4 changes: 3 additions & 1 deletion _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
<!-- Global CSS -->
<link rel="stylesheet" type="text/css" href="{{ '/assets/plugins/bootstrap/css/bootstrap.min.css' | prepend: site.baseurl }}">
<!-- Plugins CSS -->
<link rel="stylesheet" type="text/css" href="{{ '/assets/plugins/font-awesome/css/font-awesome.min.css' | prepend: site.baseurl }}">
<link rel="stylesheet" type="text/css" href="{{ '/assets/plugins/font-awesome/css/fontawesome.min.css' | prepend: site.baseurl }}">
<link rel="stylesheet" type="text/css" href="{{ '/assets/plugins/font-awesome/css/brands.min.css' | prepend: site.baseurl }}">
<link rel="stylesheet" type="text/css" href="{{ '/assets/plugins/font-awesome/css/regular.min.css' | prepend: site.baseurl }}">
<link rel="stylesheet" type="text/css" href="{{ '/assets/plugins/font-awesome/css/solid.min.css' | prepend: site.baseurl }}">
<link rel="stylesheet" type="text/css" href="{{ '/assets/plugins/font-awesome/css/v4-shims.min.css' | prepend: site.baseurl }}">
<link rel="stylesheet" type="text/css" href="{{ '/assets/plugins/elegant_font/css/style.css' | prepend: site.baseurl }}">
<link rel="stylesheet" type="text/css" href="{{ '/assets/plugins/prism/prism.css' | prepend: site.baseurl }}">

Expand Down
31 changes: 31 additions & 0 deletions _sass/base.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
@use "mixins" as *;

// Bootstrap 3 class aliases retained by historical documentation content.
.img-responsive {
display: block;
max-width: 100%;
height: auto;
}

.center-block {
display: block;
margin-right: auto;
margin-left: auto;
}

:where(.col-xs-6) {
flex: 0 0 auto;
width: 50%;
}

:where(.col-xs-12) {
flex: 0 0 auto;
width: 100%;
}

.doc-menu {
display: block;
}

@font-face {
font-family: 'Open Sans';
src: url('/assets/fonts/OpenSans-Medium.woff2') format('woff2'),
Expand Down Expand Up @@ -651,6 +680,8 @@ header.branding {

.breadcrumb>li+li:before {
color: var(--text-on-brand-muted);
content: var(--bs-breadcrumb-divider, "/");
padding: 0 var(--bs-breadcrumb-item-padding-x, 0.5rem);
}

.alertbox {
Expand Down
2 changes: 2 additions & 0 deletions _sass/doc.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

@use "mixins" as *;

.doc-body {
height: 100%;
overflow: visible;
Expand Down
6 changes: 6 additions & 0 deletions _sass/landing.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "mixins" as *;

/* ======= Landing Page ======= */
.landing-page {
.header {
Expand Down Expand Up @@ -335,9 +337,12 @@
max-width: 860px;
margin-left: auto;
margin-right: auto;
display: flex;
flex-wrap: wrap;
}
.item {
margin-bottom: 30px;
display: flex;

.icon-holder {
margin-bottom: 15px;
Expand All @@ -358,6 +363,7 @@
padding: 45px 30px;
background: var(--smoky-white);
position: relative;
width: 100%;
border: 1px solid var(--divider);
@include border-radius(4px);

Expand Down
11 changes: 5 additions & 6 deletions _sass/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
* Twitter: @3rdwave_themes
* Website: http://themes.3rdwavemedia.com/
*/
@import "mixins";
@import "theme-default";
@import "base";
@import "doc";
@import "landing";
@import "stdlibref";
@use "theme-default";
@use "base";
@use "doc";
@use "landing";
@use "stdlibref";
Loading