Skip to content

Commit

Permalink
feat: add initial docs (#2)
Browse files Browse the repository at this point in the history
* feat: init doc page

* feat: move to yarn
  • Loading branch information
IZUMI-Zu authored Oct 20, 2024
1 parent 792d77e commit ad2feb4
Show file tree
Hide file tree
Showing 63 changed files with 11,638 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/docs-links-check-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Check links for modified docs

on:
pull_request:
paths:
- 'docs/**'

jobs:
docs-links-check:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@master

- name: Check links for mdx files 🔎
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes' # only show errors in output.
# use-verbose-mode: 'yes' # show detailed HTTP status for checked links.
# refer to https://github.com/tcort/markdown-link-check#config-file-format
config-file: '.github/workflows/docs.links.check.config.json'
check-modified-files-only: 'yes'
file-extension: '.mdx'

- name: Check links for markdown files 🔎
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes' # only show errors in output.
# use-verbose-mode: 'yes' # show detailed HTTP status for checked links.
# refer to https://github.com/tcort/markdown-link-check#config-file-format
config-file: '.github/workflows/docs.links.check.config.json'
check-modified-files-only: 'yes'
file-extension: '.md'
23 changes: 23 additions & 0 deletions .github/workflows/docs-links-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Docs Links Check

on:
workflow_dispatch:
schedule:
- cron: "0 12 * * 6" # runs every saturday at 12:00 UTC

jobs:
docs-links-check:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@master

- name: Check Links 🔎
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes' # only show errors in output.
# use-verbose-mode: 'yes' # show detailed HTTP status for checked links.
folder-path: 'docs/' # only check the docs/ folder
# refer to https://github.com/tcort/markdown-link-check#config-file-format
config-file: '.github/workflows/docs.links.check.config.json'
file-extension: '.md*' # .md or .mdx
43 changes: 43 additions & 0 deletions .github/workflows/docs.links.check.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"ignorePatterns": [
{
"pattern": "^(?!https?:\/\/)"
},
{
"pattern": "^http://localhost"
},
{
"pattern": "^https?://your-casdoor-url.com"
},
{
"pattern": "^https?://[a-z]*.?your-site-url.com"
},
{
"pattern": "^https://flarum.org/"
},
{
"pattern": "^https://dash.cloudflare.com/"
},
{
"pattern": "^https://developer.android.com/guide/topics/manifest/manifest-element#package"
},
{
"pattern": "^https://developer.twitter.com/en/portal/dashboard"
},
{
"pattern": "^https://www.epis2048.net/2022/modify-cloudreve-to-support-casdoor/index.html"
},
{
"pattern": "^https://www.epis2048.net/2022/modify-kodexplorer-to-support-casdoor/index.html"
},
{
"pattern": "^https://help.brevo.com/hc/en-us/articles/7924908994450"
},
{
"pattern": "^https://opendocs.alipay.com\\S+"
},
{
"pattern": "^https://www.bytebase.com/docs"
}
]
}
26 changes: 26 additions & 0 deletions .github/workflows/markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Markdown Lint

on:
workflow_dispatch:
pull_request:
paths:
- 'docs/**'

jobs:
markdownlint:
name: Markdown Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'

- name: Install markdownlint
run: npm install -g [email protected]

- name: Run markdownlint
run: markdownlint 'docs/**/*.{md,mdx}' --config .markdownlint.jsonc
47 changes: 47 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build and Deploy
on:
push:
branches:
- master
jobs:
build-and-deploy:
# env:
# CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
runs-on: ubuntu-latest
steps:
- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true

- name: Checkout 🛎️
uses: actions/checkout@v3

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install and Build 🔧
run: |
yarn install
# yarn crowdin:sync
yarn build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
git-config-name: ${{ secrets.GH_NAME }}
git-config-email: ${{ secrets.GH_EMAIL }}
repository-name: casdoor/casdoorapp.github.io
branch: master # The deploy branch.
folder: build # The deploy folder.
26 changes: 26 additions & 0 deletions .github/workflows/pr_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Node.js CI

on:
pull_request

jobs:
deploy:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [ 18.x ]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: yarn install

- name: Build website
run: yarn build --locale en
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,5 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

build
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yarn lint-staged
3 changes: 3 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
build
.docusaurus
8 changes: 8 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": [
"stylelint-config-standard"
],
"rules": {
"selector-class-pattern": null
}
}
41 changes: 40 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,40 @@
# casdoorapp-website
# Casdoor Authenticator App Documentation

This repository contains the documentation website for the Casdoor Authenticator App. The website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.

## Getting Started

### Prerequisites

- [Node.js](https://nodejs.org/en/download/) version 18 or above
- [Yarn](https://classic.yarnpkg.com/en/docs/install): please use Yarn 1

### Installation

```bash
$ yarn install
```

### Local Development

```bash
$ 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

```bash
$ yarn build
```

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

## Contributing

We welcome contributions to improve the documentation for the Casdoor Authenticator App. Please feel free to submit issues or pull requests.

## License

This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
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")],
};
51 changes: 51 additions & 0 deletions blog/2024-10-18.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
slug: welcome
title: Welcome
author: IZUMI-Zu
authorTitle: Casdoor App Contributor
authorURL: https://github.com/IZUMI-Zu
authorImageURL: https://avatars.githubusercontent.com/u/23271676?s=100
tags: [Casdoor, Authenticator, Totp]
---

Welcome to the official website of the Casdoor Authenticator App! 👋

## What is Casdoor Authenticator App?

The Casdoor Authenticator App is a mobile application designed to enhance the security of your online accounts by providing Time-based One-Time Passwords (TOTP) for multi-factor authentication. It's an integral part of the Casdoor ecosystem, which is a comprehensive Identity Access Management (IAM) and Single-Sign-On (SSO) platform.

## Key Features

1. **TOTP Support**: Generates secure, time-based one-time passwords that change every 30 seconds.
2. **Cross-Platform**: Available for both Android and iOS devices.
3. **Seamless Integration**: Works perfectly with the Casdoor platform and other TOTP-compatible services.
4. **Offline Functionality**: Provides TOTP codes without requiring an internet connection.
5. **Secure Backup**: Supports syncing TOTP data to the Casdoor server for secure backups.
6. **User-Friendly Interface**: Offers a simple and intuitive mobile app interface for managing 2FA.

## Why use Casdoor Authenticator App?

* 🔐 **Enhanced Security**: Protect your accounts with an additional layer of security using time-based one-time passwords.
* 🌐 **Versatility**: Compatible with any service that supports TOTP-based two-factor authentication.
* 💼 **Business Integration**: Seamlessly integrates with Casdoor's IAM platform for enterprise-level security.
* 🔄 **Easy Migration**: Supports importing TOTP data from other authenticator apps like Google Authenticator.

## Getting Started

To begin using the Casdoor Authenticator App:

1. Download the app from the official sources.
2. Set up your Casdoor account (if using server-side storage).
3. Start adding and managing your TOTP codes for various accounts.

For detailed instructions on setup, usage, and migration from other authenticator apps, please refer to our [comprehensive documentation](/docs/basic/getting-started).

## Join Our Community

We welcome contributions and feedback from our users. Join our community to stay updated on the latest developments, share your experiences, and contribute to making Casdoor Authenticator even better!

* [GitHub Repository](https://github.com/casdoor/casdoor-app)
* [Discord Channel](https://discord.gg/5rPsrAzK7S)
* [QQ Group](https://cdn.casdoor.com/casdoor/resource/built-in/admin/qq_casdoor.png)

Thank you for choosing Casdoor Authenticator App. Let's make online authentication more secure together!
35 changes: 35 additions & 0 deletions docs/basic/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: Getting Started
description: Casdoor App Getting Started
keywords: [casdoor, authenticator]
authors: [IZUMI-Zu]
---

## Introduction

The Casdoor Authenticator App is a mobile application designed to enhance the security of your online accounts by providing Time-based One-Time Passwords (TOTP) for multi-factor authentication. This guide will help you get started with the app quickly and easily.

## Prerequisites

Before you begin, ensure you have the following prerequisites:

- A Casdoor server (optional)
- A compatible mobile device (iOS or Android)

## Installation

1. For iOS users:
- Currently, the app is not available on the App Store.
- You can build the app from source code. See [here](../build/configuration.md) for more details.

2. For Android users:
- You can download the app from the [GitHub Releases page](https://github.com/casdoor/casdoor-app/releases).
- Install the APK file on your device.

## Initial Setup

1. Open the Casdoor Authenticator App after installation
2. If you have a Casdoor account and want to use server-side synchronization:
- Tap "Log in with Casdoor"
- Enter your Casdoor credentials
3. Use the app to scan the QR code to add your Multi-factor authentication.
Loading

0 comments on commit ad2feb4

Please sign in to comment.