Skip to content

Commit

Permalink
feat: mkdocsをセットアップ
Browse files Browse the repository at this point in the history
  • Loading branch information
book000 committed Nov 15, 2024
1 parent 5307084 commit 245ac98
Show file tree
Hide file tree
Showing 19 changed files with 311 additions and 10 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Doc Build

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build
run: |
python -m mkdocs build --verbose --clean --strict
- name: Upload Pages-artifact
uses: actions/upload-pages-artifact@v3
with:
path: site
51 changes: 51 additions & 0 deletions .github/workflows/doc-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Doc Deploy

on:
workflow_dispatch:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build
run: |
python -m mkdocs build --verbose --clean --strict
- name: Upload Pages-artifact
uses: actions/upload-pages-artifact@v3
with:
path: site

deploy:
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@ go.work.sum
# test files
test/
data/

# virtual env
venv/
.venv/

site/
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
# splashscreen-changer

EasyAntiCheat を使用しているアプリケーションにおいて起動時に表示される、以下のようなスプラッシュスクリーンの背景画像を変更します
EasyAntiCheat を使用しているアプリケーションにおいて起動時に表示される、スプラッシュスクリーンの背景画像を以下のように変更するアプリケーションです
VRChat に対しての利用を想定していますが、他のアプリケーションでも利用できます。

// スプラッシュスクリーンの画像
![](docs/assets/customized-splashscreen.png)

## ✨ 特徴

- 起動するごとに用意した画像からランダムで設定
- 用意する画像は事前にリサイズ・クロップする必要なく、自動で処理
- EasyAntiCheat を利用しているアプリケーションであれば利用可能
- VRChat 用に利用する場合は設定ファイルの作成をせずに使い始められる

## 🚀 インストール手順

本アプリケーションのインストールには、いくつかの方法があります。
本アプリケーションのインストールには、いくつかの方法があります。
具体的なインストール方法については、リンク先をご覧ください。

- 実行ファイルによるポータブルインストール (おすすめ)
- Scoop によるインストール
- go install によるインストール

これらの具体的なインストール方法については、以下のページをご覧ください。

// ドキュメントページリンク
- [実行ファイルによるポータブルインストール]() (おすすめ)
- [Scoop によるインストール]()
- [go install によるインストール]()

## 🔍 使い方

Expand Down
Binary file added docs/assets/customized-splashscreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/default-splashscreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions docs/css/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.md-footer__inner {
display: none !important;
}

div.md-sidebar.md-sidebar--primary nav.md-nav--primary > label {
display: none !important;
}
42 changes: 42 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# splashscreen-changer

EasyAntiCheat を使用しているアプリケーションにおいて起動時に表示される、スプラッシュスクリーンの背景画像を以下のように変更するアプリケーションです。
VRChat に対しての利用を想定していますが、他のアプリケーションでも利用できます。

![](assets/customized-splashscreen.png)

## ✨ 特徴

- 起動するごとに用意した画像からランダムで設定
- 用意する画像は事前にリサイズ・クロップする必要なく、自動で処理
- EasyAntiCheat を利用しているアプリケーションであれば利用可能
- VRChat 用に利用する場合は設定ファイルの作成をせずに使い始められる

## 🚀 インストール手順

本アプリケーションのインストールには、いくつかの方法があります。
具体的なインストール方法については、リンク先をご覧ください。

- [実行ファイルによるポータブルインストール](installation/portable.md) (おすすめ)
- [Scoop によるインストール](installation/scoop.md)
- [go install によるインストール](installation/go-install.md)

## 🔍 使い方

具体的な使い方については、[使い方](usage/index.md) をご覧ください。

## 🛠️ 設定

このアプリケーションを使うためには、最初に設定が必要です。
設定方法については、[設定](settings/index.md) をご覧ください。

## 🎁 寄付

このプロジェクトでは、寄付を受け付けています。以下の方法で寄付が可能です。

- Booth: 準備中
- GitHub Sponsor: [@book000](https://github.com/sponsors/book000)

## 📑 ライセンス

このプロジェクトのライセンスは [MIT License](LICENSE) です。
5 changes: 5 additions & 0 deletions docs/installation/.pages
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
title: インストール
nav:
- portable.md
- scoop.md
- go-install.md
1 change: 1 addition & 0 deletions docs/installation/go-install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# go install によるインストール
7 changes: 7 additions & 0 deletions docs/installation/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# インストール

本アプリケーションのインストールには、いくつかの方法があります。以下からお好きなものをお選びください。

- [実行ファイルによるポータブルインストール](portable.md) (おすすめ)
- [Scoop によるインストール](scoop.md)
- [go install によるインストール](go-install.md)
55 changes: 55 additions & 0 deletions docs/installation/portable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# 実行ファイルによるポータブルインストール

このページでは、splashscreen-changer を実行ファイルによるポータブルインストールする場合の手順について説明しています。

!!! info "Windows 以外の OS を利用している方へ"
このアプリケーションは複数の OS に対応しています。
しかしながら、このページにおいては便宜上 Windows 64 bit 環境を使用しているユーザー向けに記載しています。
他の OS を利用している場合は、適宜読み替えてください。

## 1. リリースページにアクセスしダウンロード

まず、[リリースページ](https://github.com/tomacheese/splashscreen-changer/releases/latest) にアクセスします。

アクセスすると以下のように、Assets という欄があります。
ここから `splashscreen-changer_Windows_x86_64.zip` を探し、クリックしてください。

// 画像

## 2. ダウンロードしたファイルを展開し任意の場所に格納

ダウンロードしたファイルをダブルクリックして開くと、中に `splashscreen-changer.exe` というファイルがあります。
設定によっては最後の `.exe` は表示されていないかもしれません。
このファイルをコピーし、お好きなところにペーストしてください。

ここでは、ユーザーフォルダに `splashscreen-changer` というフォルダを作成し、その中にペーストしました。

// 画像

## 4. 設定ファイルの作成

このアプリケーションは、なにも設定しない場合次のような動作をします。
**この動作を変更したい場合は、設定ファイルの作成が必要** です。そうでない場合は、次に進んでください。

- 元画像のフォルダ: ピクチャーフォルダ内の VRChat フォルダ(VRChat 内でカメラを使って写真を撮った時に保存されるフォルダ)
- スプラッシュスクリーンを変更するアプリケーション: VRChat
- 変換後の画像サイズ: 800x450

!!! tips
あなたが、「VRChat 内で撮った写真の中からランダムで画像を選んで、VRChat 起動時に出てくる背景画像にしたい!」のであれば、このままで大丈夫です。
そうではなく、**選別した画像の中からランダムで選んでほしい場合** や、**VRChat 以外の EasyAntiCheat が導入されたアプリケーションで利用したい場合** は、設定ファイルの作成が必要になります。

設定ファイルに関して詳しくは、[設定ファイル](../settings/file/index.md) ページを参照してください。

## 5. 自動起動の設定

このアプリケーションは、実行するたびにランダムに画像を設定します。
そのため、なんらかの条件で定期的に背景画像を変えたいという場合は、設定が必要です。

以下の方法をおすすめしています。

1. スタートアップに設定し、PC が起動するたびに画像が変更される
2. タスクスケジューラーを用いて、定期的に画像が変更される
3. VRCX のスタートアップ機能を用いて、VRChat が起動するたびに画像が変更される

これらの具体的な設定方法については、[自動起動](../settings/file/index.md) ページを参照してください。
1 change: 1 addition & 0 deletions docs/installation/scoop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Scoop によるインストール
Empty file.
Empty file added docs/settings/file/index.md
Empty file.
Empty file added docs/settings/index.md
Empty file.
Empty file added docs/usage/index.md
Empty file.
83 changes: 83 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
site_name: splashscreen-changer

repo_name: tomacheese/splashscreen-changer
repo_url: https://github.com/tomacheese/splashscreen-changer
edit_uri: edit/master/docs

nav:
- Home: index.md
- ...

theme:
name: material
language: ja
favicon: assets/favicon.png
palette:
- media: "(prefers-color-scheme: light)"
scheme: default
primary: teal
toggle:
icon: material/brightness-7
name: Switch to dark mode

- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: teal
toggle:
icon: material/brightness-4
name: Switch to light mode
features:
- navigation.instant
- navigation.expand
- navigation.indexes
- navigation.sticky
- navigation.sections
- toc.follow
- content.code.copy
icon:
logo: material/folder-multiple-image
repo: fontawesome/brands/github

markdown_extensions:
- toc:
permalink: true
- footnotes
- admonition
- md_in_html
- pymdownx.magiclink
- pymdownx.details
- pymdownx.critic
- pymdownx.caret
- pymdownx.keys
- pymdownx.mark
- pymdownx.tilde
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
- pymdownx.emoji:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
- pymdownx.tasklist:
custom_checkbox: true
- mdx_truly_sane_lists:
nested_indent: 2
- attr_list
- md_in_html

extra:
search:
language: ja

extra_css:
- css/extra.css

plugins:
- search
- git-revision-date-localized:
enable_creation_date: true
type: iso_datetime
timezone: Asia/Tokyo
- awesome-pages
- glightbox
6 changes: 6 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mkdocs==1.6.1
mkdocs-material==9.5.44
mkdocs-git-revision-date-localized-plugin==1.3.0
mkdocs-awesome-pages-plugin==2.9.3
mdx_truly_sane_lists==1.3
mkdocs-glightbox==0.4.0

0 comments on commit 245ac98

Please sign in to comment.