Skip to content

Commit

Permalink
Add website
Browse files Browse the repository at this point in the history
  • Loading branch information
matkoch committed Feb 22, 2022
1 parent 3a1d3ef commit 492dc09
Show file tree
Hide file tree
Showing 14 changed files with 9,319 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ indent_size = 2
indent_size = 2

# JSON files
[*.json]
[*.{json,js}]
indent_size = 2

# Dotnet code style settings:
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: website

on:
push:
branches: [develop]
paths:
- 'website/**'

jobs:
deploy:
name: Deploy Website
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14.x
cache: npm
cache-dependency-path: website/package-lock.json
- name: Build
working-directory: website
run: |
npm ci
npm run build
# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./website/build
# user_name: github-actions[bot]
# user_email: 41898282+github-actions[bot]@users.noreply.github.com
20 changes: 20 additions & 0 deletions website/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
13 changes: 13 additions & 0 deletions website/analytics.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'

export default (function () {
if (!ExecutionEnvironment.canUseDOM) {
return null
}

return {
onRouteUpdate({ location }) {
setTimeout(() => fathom.trackPageview(), 1000);
}
}
})()
3 changes: 3 additions & 0 deletions website/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
55 changes: 55 additions & 0 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');

/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'NUKE',
url: 'https://nuke.build',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'nuke-build',
projectName: 'nuke',
trailingSlash: false,

presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: false,
blog: false,
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],

clientModules: [
],

plugins: [
],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
},
footer: {
style: 'dark',
copyright: `Copyright © ${new Date().getFullYear()} NUKE`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
};

module.exports = config;
Loading

0 comments on commit 492dc09

Please sign in to comment.