Skip to content

Commit

Permalink
Merge pull request #185 from oystersjp/feature/v2-env
Browse files Browse the repository at this point in the history
[oysters.dev v2] 環境構築
  • Loading branch information
mii288 authored Aug 18, 2024
2 parents 87a9b36 + 6148ab4 commit ff574b7
Show file tree
Hide file tree
Showing 133 changed files with 8,975 additions and 27,424 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

53 changes: 0 additions & 53 deletions .eslintrc.js

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: nwtgck/[email protected]
name: deploy to netlify
with:
publish-dir: './out'
publish-dir: ./dist
github-token: ${{ secrets.GITHUB_TOKEN }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
Expand Down Expand Up @@ -76,4 +76,4 @@ jobs:
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
publish_dir: ./dist
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: nwtgck/[email protected]
name: deploy to netlify
with:
publish-dir: './out'
publish-dir: ./dist
github-token: ${{ secrets.GITHUB_TOKEN }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
Expand Down
43 changes: 16 additions & 27 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,35 +1,24 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# build output
dist/

# dependencies
/node_modules
/.pnp
.pnp.js
tsconfig.tsbuildinfo

# testing
/coverage

# next.js
/.next/
/out/

# production
/build
# generated types
.astro/

# misc
.DS_Store
*.pem
# dependencies
node_modules/

# debug
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local
# environment variables
.env
.env.production

# macOS-specific files
.DS_Store

# vercel
.vercel
# jetbrains setting folder
.idea/
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
3 changes: 0 additions & 3 deletions .hygen.js

This file was deleted.

10 changes: 0 additions & 10 deletions .hygen/gen/intro/introduction.ejs.t

This file was deleted.

28 changes: 0 additions & 28 deletions .hygen/gen/intro/prompt.js

This file was deleted.

10 changes: 10 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/** @type {import('lint-staged').Config} */
export default {
'*.{css,scss,astro}': ['npm run fix:css', 'npm run fix:format'],
'*.{js,cjs,mjs,ts,jsx,tsx,astro}': [
'npm run fix:js',
'npm run fix:format',
() => 'npm run type-check'
],
'*.{md,html,json,yaml,yml}': ['npm run fix:format']
}
5 changes: 0 additions & 5 deletions .prettierrc.json

This file was deleted.

15 changes: 15 additions & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/** @type {import("prettier").Config} */
export default {
plugins: ['prettier-plugin-astro'],
semi: false,
singleQuote: true,
trailingComma: 'none',
overrides: [
{
files: '*.astro',
options: {
parser: 'astro'
}
}
]
}
9 changes: 9 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"recommendations": [
"astro-build.astro-vscode",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"stylelint.vscode-stylelint"
],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
14 changes: 14 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"eslint.validate": [
"javascript",
"javascriptreact",
"astro",
"typescript",
"typescriptreact"
],
"stylelint.validate": ["html", "astro"],
"prettier.documentSelectors": ["**/*.astro"],
"[astro]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
66 changes: 18 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,31 @@
Oysters紹介ページ
====
# Oysters公式ウェブサイト

メンテナ向け
----
## メンテナ向け

### 初回インストール
### 開発サーバ起動

```
npm install
```

### 開発用サーバ起動 & 変更時自動ビルド

```
npm run dev
```
1. Nodejs(v20.16.0)をインストール ([nodenv](https://github.com/nodenv/nodenv)推奨)
2. 以下コマンドを実行し、<http://localhost:4321>を開く

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
```sh
$ npm ci
$ npm run dev

## メンバーの追加方法
> [email protected] dev
> astro dev

以下にメンバーの追加手順を記します。
22:50:09 [types] Generated 0ms

1. `content/members/images`にご自身のプロフィール画像を追加する。
2. コマンド `npm run add-member` を実行し、質問に沿ってコマンドラインに入力していく。
3. `content/members` 以下に追加したいメンバーの名前のついたtsファイルが存在しているか内容も含めて確認する。
4. 別ブランチを切ってコミットし、PRを作成してレビュー依頼する。(誰でもOK)
astro v4.13.1 ready in 95 ms

## 画像の最適化方法について

[cyrilwanner/next-optimized-images@canary](https://github.com/cyrilwanner/next-optimized-images)を使った画像リサイズ/圧縮ができます。

```tsx
<img
src={require(`@/content/members/${member.image}?width=144&height=144`)}
width={72}
height={72}
/>

/**
* 結果:
* <img src="data:image/jpeg;base64,/9..." width="72" height="72">
*/
┃ Local http://localhost:4321/
┃ Network use --host to expose
```

**注意:**

- 画像パスは動的に設定できますが、クエリ部分に変数は使用できません。
- 変換後の画像のサイズがある程度小さい場合は自動的にインライン画像になります(設定で変更可能)

詳しい使い方は[cyrilwanner/next-optimized-images](https://github.com/cyrilwanner/next-optimized-images)を確認してください。
### メンバーの追加方法

Special Thanks
----
_TODO: 以下にメンバーの追加手順を記します。_

- [nextjs](https://nextjs.org/)
## Links

- [Hugo](https://gohugo.io/) ※旧サイトで利用
- [themefisher/meghna-hugo](https://github.com/themefisher/meghna-hugo)
- [themefisher/themefisher-font](https://github.com/themefisher/themefisher-font)
- [astro](https://docs.astro.build)
2 changes: 0 additions & 2 deletions _config.yml

This file was deleted.

7 changes: 7 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineConfig } from 'astro/config'
import tailwind from '@astrojs/tailwind'

// https://astro.build/config
export default defineConfig({
integrations: [tailwind()]
})
Loading

1 comment on commit ff574b7

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.