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

Development of basic website #6

Merged
merged 4 commits into from
Apr 6, 2024
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
75 changes: 75 additions & 0 deletions .github/workflows/website.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: website

on:
push:
branches: [master]
paths: ['docs/www/**']
pull_request:
branches: [master]
types: [opened, synchronize]
paths: ['docs/www/**']
schedule:
- cron: '0 0 * * 1'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-analyze:
defaults:
run:
working-directory: docs/www
permissions:
security-events: write
runs-on: ubuntu-latest
steps:
- name: checkout-repo
uses: actions/checkout@v4
- name: setup-node
uses: actions/setup-node@v4
with:
cache: npm
node-version: '20'
cache-dependency-path: docs/www/package-lock.json
- name: install-dependencies
run: npm ci --no-audit --no-fund --omit=optional
- name: setup-codeql
uses: github/codeql-action/init@v3
with:
languages: javascript-typescript
- name: build
run: npm run build
- name: analyze
uses: github/codeql-action/analyze@v3
- name: upload-artifact
if: ${{ github.event_name == 'push' }}
uses: actions/upload-artifact@v4
with:
name: build
path: docs/www/build
deploy:
if: ${{ github.event_name == 'push' }}
needs: [build-analyze]
environment:
name: ${{ github.workflow }}
url: ${{ steps.deploy.outputs.page_url }}
permissions:
id-token: write
pages: write
runs-on: ubuntu-latest
steps:
- name: download-artifact
uses: actions/download-artifact@v4
with:
name: build
path: build
- name: setup-page
uses: actions/configure-pages@v4
- name: upload-page
uses: actions/upload-pages-artifact@v3
with:
path: build
- name: deploy-page
id: deploy
uses: actions/deploy-pages@v4
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
build/
docs/www/.docusaurus/
docs/www/build/
docs/www/node_modules/

sparky
sparky_debug
3 changes: 3 additions & 0 deletions docs/www/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')]
};
5 changes: 5 additions & 0 deletions docs/www/blog/authors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
iwas:
name: Wasym Atieh Alonso
title: Creator and maintainer of Sparky
url: https://github.com/iWas-Coder
image_url: https://github.com/iWas-Coder.png
8 changes: 8 additions & 0 deletions docs/www/blog/dummy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
slug: dummy-post
title: Dummy post
authors: iwas
tags: [dummy]
---

This is a dummy blog post so the build process works :D
13 changes: 13 additions & 0 deletions docs/www/docs/1-overview/1.1-what-is-sparky.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: What is Sparky?
---

# What is Sparky?

<div className='content-banner'>
Welcome to the very start of your Sparky journey! If you're looking for the environment setup instructions, they're located in <a href='../getting-started/2.1-getting-started'>their own section</a>.
Continue reading for an introduction to the documentation, how it works, and more!
<img className='content-banner-img' src='/sparky/img/p_android-ios-devices.svg' alt='Cross-platform' />
</div>

(...)
7 changes: 7 additions & 0 deletions docs/www/docs/1-overview/1.2-architecture-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Architecture overview
---

# Architecture overview

(...)
2 changes: 2 additions & 0 deletions docs/www/docs/1-overview/_category_.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
label: Overview
position: 1
7 changes: 7 additions & 0 deletions docs/www/docs/2-getting-started/2.1-getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Getting Started
---

# Getting Started

(...)
2 changes: 2 additions & 0 deletions docs/www/docs/2-getting-started/_category_.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
label: Getting Started
position: 2
128 changes: 128 additions & 0 deletions docs/www/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
import { themes as prismThemes } from 'prism-react-renderer';

const config = {
title: 'Sparky: 5v5 character-based libre tactical shooter',
tagline: 'A 5v5, blazingly flast, character-based libre tactical shooter written in pure C.',
favicon: 'img/favicon.png',
url: 'https://iwas-coder.github.io',
baseUrl: '/sparky',
organizationName: 'iWas-Coder',
projectName: 'sparky',
trailingSlash: false,
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',

i18n: {
defaultLocale: 'en',
locales: ['en']
},

presets: [
[
'classic',
{
docs: {
sidebarPath: './sidebars.js',
editUrl: 'https://github.com/iWas-Coder/sparky/blob/master/docs/www/docs/',
showLastUpdateTime: true
},
blog: {
showReadingTime: true,
editUrl: 'https://github.com/iWas-Coder/sparky/blob/master/docs/www/blog/'
},
theme: {
customCss: './src/css/custom.css'
}
}
]
],

themeConfig: ({
navbar: {
logo: {
alt: 'Sparky Logo',
src: 'img/logo.png'
},
items: [
{
href: 'https://github.com/iWas-Coder/sparky',
className: 'header-github-link',
'aria-label': 'GitHub',
position: 'right'
},
{
href: 'https://iwas-coder.itch.io/sparky',
className: 'header-itchio-link',
'aria-label': 'itch.io',
position: 'right'
},
{
href: 'https://buymeacoffee.com/iwas.coder',
className: 'header-bmac-link',
'aria-label': 'Buy me a coffee',
position: 'right'
},
{
type: 'docSidebar',
sidebarId: 'docs',
position: 'left',
label: 'Docs'
},
{
to: 'blog',
position: 'left',
label: 'Blog'
}
],
},
algolia: {
appId: 'NQFRICJH33',
apiKey: 'b7e7597d510e0f0a58977359d95f64ca',
indexName: 'iwas-coderio',
contextualSearch: true
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'What is Sparky?',
to: 'docs/overview/1.1-what-is-sparky'
},
{
label: 'Getting started',
to: 'docs/getting-started/2.1-getting-started'
}
]
},
{
title: 'Community',
items: [
{
label: 'Contributing',
href: 'https://github.com/iWas-Coder/sparky/blob/master/CONTRIBUTING.org'
}
]
},
{
title: 'More',
items: [
{
label: 'GitHub',
href: 'https://github.com/iWas-Coder/sparky',
}
]
}
],
copyright: `Copyright © ${new Date().getFullYear()} Wasym Atieh Alonso. All rights reserved.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
}
})
};

export default config;
Loading