Skip to content

Commit

Permalink
ドキュメントを整理 (#68)
Browse files Browse the repository at this point in the history
* docs: update README

* docs: add English ver

* fix: english README

* docs: add SECURITY.md

* docs: add CONTRIBUTING.md

* docs: add prettier command description

* docs: fix

* fix: translation
  • Loading branch information
Ryoga-exe authored Dec 3, 2023
1 parent 754be08 commit 6cbdebc
Show file tree
Hide file tree
Showing 5 changed files with 263 additions and 34 deletions.
91 changes: 91 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
[日本語](./CONTRIBUTING.md) | [English](./docs/CONTRIBUTING.en.md)

# 貢献の仕方

コントリビューターの皆様、本プロジェクトにご参加いただきありがとうございます!
どんなサイズの貢献も、どんなスキルレベルのコントリビューターも歓迎します。

本ウェブサイトの開発に参加してくださる方に対して、参加方法をお伝えします。

## クイックガイド

### 推奨環境

```
node: "^>=20.8.0"
npm: "^>=10.1.0"
```

### ローカルリポジトリのセットアップ

```bash
git clone && cd ...
npm install
npm run build
```

### 開発方法

```bash
# ローカル開発サーバを localhost:4321 で起動します
npm run dev
# プロダクションサイトをビルドします
npm run build
```

## プロジェクトの構成

```bash
/
├── src/
│ ├── assets/
│ ├── components/
│ ├── content/
│ ├── icons/
│ ├── layouts/
│ ├── middleware/
│ ├── pages/
│ ├── styles/
│ ├── types/
│ ├── utils/
│ └── consts.ts
├── public/
├── package.json
├── astro.config.mjs
└── tsconfig.json
```

- `src/*` - プロジェクトソースコード(コンポーネント、ページ、スタイルなど)
- `src/assets/*` - 画像ファイル、[astro:assets](https://docs.astro.build/ja/guides/images/) で使用されます
- `src/components/*` - ページのための再利用可能なコードユニット
- `src/content/*` - コンテンツデータやマークダウンファイル
- `src/icons/*` - アイコン関連のファイル、[astro-icons](https://github.com/natemoo-re/astro-icon) で使用されます
- `src/layouts/*` - 1 つまたは複数のページで共有される UI 構造
- `src/middleware/*` - アプリケーションの中間層(middleware)に関連するコード
- `src/pages/*` - 各ページのコード
- `src/styles/*` - スタイル関連のファイル
- `src/types/*` - TypeScript の型定義ファイル
- `src/utils/*` - ユーティリティ関数やヘルパー関数
- `src/consts.ts` - 定数が定義されたファイル
- `public/*` - コード以外の処理不要のアセット(フォント、アイコンなど)
- `package.json` - プロジェクトマニフェスト
- `astro.config.mjs` - Astro の設定ファイル
- `tsconfig.json` - TypeScript の設定ファイル

## ブランチ

このセクションでは開発の際に使用されるブランチについて説明します

### `production`

実際に公開されるサイトに反映されます。このブランチは一定間隔で行われる特別な Pull Request により `develop` ブランチの変更が取り込まれます。

https://teaser23.pages.dev にデプロイされます。(雙峰祭準備期間中は https://sohosai.com に公開されます)

### `develop` (デフォルトブランチ)

teaser23 のアクティブな開発は `develop` ブランチで行われています。`develop` ブランチは常に最新のコードを反映しています。

新しい機能を追加したい場合や、バグの修正をしたい場合、`develop` ブランチからブランチを切ってください。また、Pull Request はこのブランチにマージされます。

https://develop.teaser23.pages.dev にデプロイされます。
62 changes: 28 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,41 @@
# teaser23

またの名を準備期間 Web と言います。

## 環境
[日本語](./README.md) | [English](./docs/README.en.md)

とりあえず Astro Starter Kit: Minimal でテンプレートを作成しました。
# teaser23

```
npm create astro@latest -- --template minimal
```
筑波大学学園祭「雙峰祭」のティザーサイトです。
またの名を「準備期間 Web」と言います。

### 🚀 Project Structure
https://teaser23.pages.dev

Inside of your Astro project, you'll see the following folders and files:
## 構成

```
```sh
/
├── public/
├── src/
│ └── pages/
│ └── index.astro
│ ├── assets/
│ ├── components/
│ ├── content/
│ ├── icons/
│ ├── layouts/
│ ├── middleware/
│ ├── pages/
│ ├── styles/
│ ├── types/
│ ├── utils/
│ └── consts.ts
└── package.json
```

Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.

There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.

Any static assets, like images, can be placed in the `public/` directory.

### 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:3000` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |
## 開発方法

### 👀 Want to learn more?
すべてのコマンドはプロジェクトのルートから、ターミナルで実行します:

Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
| コマンド | 説明 |
| :------------------------ | :------------------------------------------------------ |
| `npm install` | 依存関係をインストールします |
| `npm run dev` | ローカル開発サーバを `localhost:4321` で起動します。 |
| `npm run build` | プロダクションサイトを `./dist/` にビルドします |
| `npm run preview` | ビルドをローカルでプレビューします |
| `npm run prettier:check` | Prettier を使用し、コードが整形されているかを確認します |
| `npm run prettier:format` | Prettier を使用し、コードを整形します |
13 changes: 13 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[日本語](#セキュリティーポリシー) | [English](#security-policy)

# セキュリティーポリシー

## 脆弱性を報告する

もし本リポジトリに関することで脆弱性を見つけた場合は `[email protected]` にご連絡ください。

# Security Policy

## Reporting a Vulnerability

If you discover any vulnerabilities related to this repository, please report to `[email protected]`.
91 changes: 91 additions & 0 deletions docs/CONTRIBUTING.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
[日本語](./../CONTRIBUTING.md) | [English](./CONTRIBUTING.en.md)

# Contribution Guide

Dear Contributor, Thank you for participating in this project!
We welcome contributions of any size and contributors of any skill level.

For those of you who are interested in participating in the development of this website, we will provide you with instructions on how to participate.

## Quick Guide

### Prerequisites

```
node: "^>=20.8.0"
npm: "^>=10.1.0"
```

### Setting up your local repo

```bash
git clone && cd ...
npm install
npm run build
```

### Development

```bash
# starts local dev server at localhost:4321
npm run dev
# build a production site
npm run build
```

## Project Structure

```bash
/
├── src/
│ ├── assets/
│ ├── components/
│ ├── content/
│ ├── icons/
│ ├── layouts/
│ ├── middleware/
│ ├── pages/
│ ├── styles/
│ ├── types/
│ ├── utils/
│ └── consts.ts
├── public/
├── package.json
├── astro.config.mjs
└── tsconfig.json
```

- `src/*` - Project source code (components, pages, styles, etc.)
- `src/assets/*` - Image files, used in [astro:assets](https://docs.astro.build/en/guides/images/)
- `src/components/*` - Reusable units of code for pages
- `src/content/*` - Contains content data and markdown files
- `src/icons/*` - Icon-related files, used in [astro-icons](https://github.com/natemoo-re/astro-icon)
- `src/layouts/*` - The UI structure shared by one or more pages
- `src/middleware/*` - Code related to application middleware
- `src/pages/*` - Code for each page
- `src/styles/*` - Style-related files
- `src/types/*` - TypeScript type definition files
- `src/utils/*` - Utility functions and helper functions
- `src/consts.ts` - File where constants are defined
- `public/*` - Non-code, unprocessed assets (fonts, icons, etc.)
- `package.json` - A project manifest
- `astro.config.mjs` - An Astro configuration file
- `tsconfig.json` - A TypeScript configuration file

## Branches

In this section, we will explain the branches used during development.

### `production`

It will be deployed to https://teaser23.pages.dev. (During the Sohosai preparation period, it will be accessible at https://sohosai.com.)

### `develop` (default branch)

It will be reflected on the actual published site. Changes from the `develop` branch are incorporated into this branch through special Pull Requests that occur at regular intervals.

Active teaser23 development happens on the `develop` branch. `develop` always reflects the latest code.

If you want to add a new feature or fix a bug, please create a branch from the `develop` branch. Additionally, Pull Requests will be merged into this branch.

It will be deployed to https://develop.teaser23.pages.dev.
40 changes: 40 additions & 0 deletions docs/README.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[日本語](./../README.md) | [English](./README.en.md)

# teaser23

This is the teaser site for the School Festival of University of Tsukuba, known as "Sohosai" (雙峰祭). It is also referred to as the "Preparation Period Web."

https://teaser23.pages.dev

## Project Structure

```sh
/
├── public/
├── src/
│ ├── assets/
│ ├── components/
│ ├── content/
│ ├── icons/
│ ├── layouts/
│ ├── middleware/
│ ├── pages/
│ ├── styles/
│ ├── types/
│ ├── utils/
│ └── consts.ts
└── package.json
```

## Development

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :------------------------ | :------------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build a production site to `./dist/` |
| `npm run preview` | Preview a build locally, before deploying |
| `npm run prettier:check` | Check the code is properly formatted with Prettier |
| `npm run prettier:format` | Format the code with Prettier |

0 comments on commit 6cbdebc

Please sign in to comment.