Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
Signed-off-by: Quentin JEROME <[email protected]>
  • Loading branch information
qjerome committed Nov 14, 2023
1 parent a79fbb5 commit 4fd2b5a
Show file tree
Hide file tree
Showing 19 changed files with 14,034 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

permissions:
contents: write

jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm

- name: Install dependencies
run: npm ci
- name: Build website
run: npm run build

# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./build
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
user_email: github-actions[bot]@users.noreply.github.com
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/build
.cache-loader
# Dependencies
.docusaurus
.DS_Store
.env.development.local
.env.local
.env.production.local
.env.test.local
# Generated files
# Misc
/node_modules
npm-debug.log*
# Production
yarn-debug.log*
yarn-error.log*
3 changes: 3 additions & 0 deletions 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')],
};
6 changes: 6 additions & 0 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
sidebar_position: 1
---

# Quick Start

164 changes: 164 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
// @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');

// Used to debug production build issues faster
const isDev = !!process.env.DEVELOP;

/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Gene',
tagline: "A Simple Rule Format to Match your Logs",
favicon: 'img/favicon.ico',

// Set the production url of your site here
url: 'https://gene.rawsec.lu',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'rawsec', // Usually your GitHub org/user name.
projectName: 'gene', // Usually your repo name.

onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',

// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
},

presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
//includeCurrentVersion: isDev,
includeCurrentVersion: true,
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: 'https://github.com/0xrawsec/gene-doc-v2/tree/main/',
versions: {
current: {
label: `Unreleased`,
},
},
},
blog: {
showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
//editUrl: 'https://github.com/0xrawsec/gene-doc-v2/tree/main/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Replace with your project's social card
image: 'img/social-card.png',
navbar: {
title: 'Gene',
logo: {
alt: 'Gene',
src: 'img/logo.svg',
},
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'Documentation',
},
// blog is disabled
//{ to: '/blog', label: 'Blog', position: 'left' },
{
type: 'docsVersionDropdown',
position: 'right',
//dropdownItemsAfter: [{ to: '/versions', label: 'All versions' }],
//dropdownActiveClassDisabled: true,
},
{
href: 'https://github.com/sponsors/0xrawsec',
position: 'right',
className: 'button button--secondary',
html: "❤️ Sponsor"
},
{
href: 'https://github.com/0xrawsec/gene',
position: 'right',
className: "header-github-link",
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Documentation',
to: '/docs/quickstart',
},
],
},
{
title: 'Community',
items: [
/*{
label: 'Discord',
href: 'https://discord.gg/AUMaBvHvNU',
},*/
{
label: 'Twitter',
href: 'https://twitter.com/0xrawsec',
},
],
},
{
title: 'More',
items: [
// blog is disabled
/*{
label: 'Blog',
to: '/blog',
},*/
{
label: 'GitHub',
href: 'https://github.com/0xrawsec/gene',
},
{
href: 'https://github.com/sponsors/0xrawsec',
label: 'Sponsor',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} RawSec, sàrl Built with Docusaurus.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
colorMode: {
defaultMode: 'dark',
}
}),
};

module.exports = config;
Loading

0 comments on commit 4fd2b5a

Please sign in to comment.