Skip to content

Commit

Permalink
Merge pull request #223 from kevin-lee/bump-docusaurus
Browse files Browse the repository at this point in the history
Bump Docusaurus to 3.1.1
  • Loading branch information
kevin-lee committed Mar 8, 2024
2 parents ab06c0b + f6a95d7 commit 0fa59d2
Show file tree
Hide file tree
Showing 5 changed files with 7,772 additions and 14,545 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/doc-site-build-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
scala:
- { version: "2.13.10", binary-version: "2.13", java-version: "11", java-distribution: "temurin" }
node:
- { version: "16.16.0" }
- { version: "18.13.0" }

steps:
- uses: actions/checkout@v4
Expand All @@ -40,12 +40,12 @@ jobs:
${{ runner.os }}-sbt-${{ matrix.scala.binary-version }}-
- name: Cache npm
uses: actions/cache@v4
uses: actions/cache@v4.0.0
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-node-${{ matrix.node.version }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
${{ runner.os }}-node-${{ matrix.node.version }}
- name: Build website
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/doc-site-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
scala:
- { version: "2.13.10", binary-version: "2.13", java-version: "11", java-distribution: "temurin" }
node:
- { version: "16.16.0" }
- { version: "18.13.0" }

steps:
- uses: actions/checkout@v4
Expand All @@ -39,12 +39,12 @@ jobs:
${{ runner.os }}-sbt-${{ matrix.scala.binary-version }}-
- name: Cache npm
uses: actions/cache@v4
uses: actions/cache@v4.0.0
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-node-${{ matrix.node.version }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
${{ runner.os }}-node-${{ matrix.node.version }}
- name: Build and publish website
env:
Expand Down
14 changes: 8 additions & 6 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import {themes as prismThemes} from 'prism-react-renderer';

const algoliaConfig = require('./algolia.config.json');
const googleAnalyticsConfig = require('./google-analytics.config.json');

const isEmptyObject = obj => {
for (field in obj) return false;
return true;
};
const lightCodeTheme = prismThemes.nightOwlLight;
const darkCodeTheme = prismThemes.nightOwl;

const isEmptyObject = (obj) => Object.keys(obj).length === 0;

const isSearchable = !isEmptyObject(algoliaConfig);
const hasGoogleAnalytics = !isEmptyObject(googleAnalyticsConfig);
Expand All @@ -20,8 +22,8 @@ const websiteConfig = {
projectName: 'sbt-github-pages', // Usually your repo name.
themeConfig: {
prism: {
theme: require('prism-react-renderer/themes/nightOwl'),
darkTheme: require('prism-react-renderer/themes/nightOwl'),
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ['java', 'scala'],
},
navbar: {
Expand Down
Loading

0 comments on commit 0fa59d2

Please sign in to comment.