Skip to content

Commit

Permalink
feat: New documentation with Docusaurus
Browse files Browse the repository at this point in the history
  • Loading branch information
kkrypt0nn committed Nov 10, 2024
1 parent b73d28d commit e1f6e91
Show file tree
Hide file tree
Showing 32 changed files with 16,855 additions and 57 deletions.
35 changes: 10 additions & 25 deletions .github/workflows/deploy_documentation.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,24 @@
name: Project Serpens CD (Deploy Documentation)

on:
push:
tags:
- "v*"
release:
types: [published]
workflow_dispatch:

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

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy_documentation:
deploy-documentation:
name: Deploy Documentation
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Install mdBook
run: cargo install mdbook
- name: Build documentation
run: mdbook build documentation
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
uses: actions/checkout@master
- name: Deploy Docusaurus documentation
uses: redkubes/[email protected]
with:
path: documentation/book
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v2
source-folder: documentation
git-user: kkrypt0nn
git-password: ${{ secrets.PAT }}
deployment-branch: gh-pages
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ Cargo.lock
# RustRover files
.idea/

# mdBook files
documentation/book
.DS_Store
20 changes: 20 additions & 0 deletions documentation/.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*
2 changes: 2 additions & 0 deletions documentation/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ignore all MDX files; I'll format them myself if needed
**/*.mdx
21 changes: 21 additions & 0 deletions documentation/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"arrowParens": "always",
"bracketSameLine": false,
"bracketSpacing": true,
"embeddedLanguageFormatting": "auto",
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxSingleQuote": false,
"plugins": ["prettier-plugin-organize-imports"],
"printWidth": 80,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": true,
"singleAttributePerLine": false,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false
}
41 changes: 41 additions & 0 deletions documentation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus 3](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions documentation/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")],
};
8 changes: 8 additions & 0 deletions documentation/blog/2024-10-11-example.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
slug: example
title: Example
authors: [krypton]
tags: [example]
---

This is an example blog post that has no content.
5 changes: 5 additions & 0 deletions documentation/blog/authors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
krypton:
name: Krypton
title: Core Maintainer of Project Serpens
url: https://github.com/kkrypt0nn
image_url: https://github.com/kkrypt0nn.png
7 changes: 0 additions & 7 deletions documentation/book.toml

This file was deleted.

128 changes: 128 additions & 0 deletions documentation/community/code-of-conduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[email protected].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
46 changes: 46 additions & 0 deletions documentation/community/contributing-guidelines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributing Guidelines

Your input is amazing! Making contributing to this project as easy and transparent as possible is one of the most
important side, this includes:

- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer

## Wanted changes

- New features
- Bug fixing
- Better documentation
- Fixing of spelling and grammatical issues

## Unwanted changes

- Whitespaces and punctuation changes
- Word changes using synonyms
- Entire rewrites of the project, or parts of the project - unless first approved by a maintainer

## All code changes happen through pull requests

Pull requests are the best way to propose changes to the codebase. We actively welcome your pull requests:

1. Fork the repo and create your branch from `main`.
2. Keep consistency with the current state of the codebase
3. Format the code of the files properly.
4. Issue that pull request!

## Commit messages guidelines

This project uses [`Conventional Commits 1.0.0`](https://conventionalcommits.org/en/v1.0.0/) hence your commit messages
**must** follow the same convention or your contributions will be ignored, refused or assigned to another user or
maintainer.

It would be more than welcome to keep your contributions as a single commit rather than, for examples, 20 `"fix: Stuff"`
commits in-between. You may use multiple commits if you believe the changes made in these commits have nothing, or close
to nothing, in common - feel free to ask a maintainer on whether it should be a single commit or not.

## License

Your submissions are understood to be under the same [MIT License](https://github.com/kkrypt0nn/project-serpens/blob/main/LICENSE.md) that covers the project.
17 changes: 17 additions & 0 deletions documentation/community/security-policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Security Policy

## Supported Versions

Security fixes will **always** be accepted and taken in consideration if running on the **latest** version of Project
Serpens that isn't marked as pre-release. See the releases page to know which version is the latest.

| Version | Supported | End of support |
| -------- | --------- | -------------- |
| v0.\*.\* | :x: | N/A |

## Reporting a Vulnerability

For usual and non-critical bugs and/or vulnerabilities please open an issue, or pull request if you already have a fix
for it. For more important bugs and/or vulnerabilities please contact me per email
at [`[email protected]`](mailto:[email protected]) or via
Twitter [`@kkrypt0nn`](https://twitter.com/kkrypt0nn).
6 changes: 6 additions & 0 deletions documentation/docs/installation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Installation
description: Project Serpens can be installed with a single line of command.
---

`todo!()`
Loading

0 comments on commit e1f6e91

Please sign in to comment.