-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #185 from oystersjp/feature/v2-env
[oysters.dev v2] 環境構築
- Loading branch information
Showing
133 changed files
with
8,975 additions
and
27,424 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} | ||
|
@@ -76,4 +76,4 @@ jobs: | |
- uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./out | ||
publish_dir: ./dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
npx lint-staged |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()] | ||
}) |
Oops, something went wrong.
ff574b7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 Deployed on https://66c1a06fb5731c4113cdbf89--zealous-yalow-0137bf.netlify.app