Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renewal v1 #44

Open
wants to merge 38 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
a4e4378
chore(deps): update dependencies (#37)
staticWagomU Aug 5, 2024
dcaed86
chore(deps): 不要なパッケージを削除 (#41)
staticWagomU Aug 5, 2024
d9f3276
@astro/checkを導入 (#42)
staticWagomU Aug 5, 2024
57570aa
tailwindを導入したよ (#43)
staticWagomU Aug 5, 2024
11afdaa
feat: majimeはなし。
staticWagomU Jul 10, 2024
5b905b1
chore(ogp): update
staticWagomU Aug 5, 2024
371052a
chore(depends): upgrade
staticWagomU Aug 5, 2024
f2eee84
feat: add .editorconfig
staticWagomU Jul 10, 2024
fbcb925
feat: コードブロックにタイトルをつけられるようにした
staticWagomU Jul 31, 2024
966558f
feat: style削除
staticWagomU Jul 31, 2024
8917231
feat: format関連のスクリプトを追加
staticWagomU Aug 1, 2024
39cad0f
refactor: prettier
staticWagomU Aug 1, 2024
c86549f
feat: h2含む中身をsectionで囲うrehypeプラグイン書いたよ
staticWagomU Sep 18, 2024
0d6ed5f
feat: update astro config
staticWagomU Sep 18, 2024
7bd5f89
feat: update astro config
staticWagomU Sep 18, 2024
9f680a8
feat: 最終更新日を自動的に挿入するremarkプラグインを追加
staticWagomU Sep 26, 2024
d09690d
chore(prettier): migrate .prettierrc to .prettierrc.json
staticWagomU Oct 1, 2024
834db36
chore(prettier): ignore *.md and *.mdx
staticWagomU Oct 1, 2024
c19d982
chore: update packages
staticWagomU Oct 1, 2024
e96bcc6
feat(astro.config): Never match URLs that include a trailing slash
staticWagomU Oct 1, 2024
ae2ec1b
feat(astro.config): remove tailwindcss
staticWagomU Oct 1, 2024
d1813c5
perf: Google Fontsのパフォーマンスを改善
staticWagomU Oct 1, 2024
dda2478
feat: add astro-compress
staticWagomU Oct 1, 2024
43c4241
chore(editorconfig): update
staticWagomU Oct 1, 2024
c55b2e8
feat: add @playform/inline
staticWagomU Oct 1, 2024
dd5e4fb
feat: CVの外部リンク追加
staticWagomU Oct 1, 2024
d2c654c
style: formatされてた
staticWagomU Oct 1, 2024
b721584
feat: remarkBudouxを追加
staticWagomU Oct 1, 2024
42e15d0
feat: add pnpm-workspace
staticWagomU Oct 2, 2024
1e4041b
chore: pnpm-workspaceに関連する修正
staticWagomU Oct 2, 2024
72f723a
perf: postを一意に定める
staticWagomU Oct 2, 2024
5793d4c
feat: おしゃれタイムライン形式
staticWagomU Oct 2, 2024
a5c38da
feat: 現状のcssファイルにするよ
staticWagomU Oct 2, 2024
ad2a12a
feat: いったんこれで!
staticWagomU Oct 2, 2024
955d26e
style: pretiier
staticWagomU Oct 2, 2024
69aed6d
feat: おしゃれヘッダー
staticWagomU Oct 2, 2024
1fc0bed
feat: はずかしい名前だった
staticWagomU Oct 2, 2024
ca477a9
あ、これ必要かも
staticWagomU Oct 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true

[*]
indent_style = tab
tab_width = 2

[{src,scripts}/**.{ts,json,js,cjs}]
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

⚠️ Potential issue

Consider using LF instead of CRLF for better cross-platform compatibility.

The specific settings for .ts, .json, .js, and .cjs files in the src and scripts directories are generally good:

  • UTF-8 charset is a good standard choice.
  • Trimming trailing whitespace and inserting a final newline are good practices.

However, the use of CRLF line endings may cause issues on non-Windows systems. Consider using LF instead for better cross-platform compatibility.

Apply this change to use LF line endings:

[{src,scripts}/**.{ts,json,js,cjs}]
-end_of_line = crlf
+end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
[{src,scripts}/**.{ts,json,js,cjs}]
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[{src,scripts}/**.{ts,json,js,cjs}]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.mdx
*.md
2 changes: 1 addition & 1 deletion .prettierrc → .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"plugins": ["prettier-plugin-astro"],
"overrides": [
{
"files": [".*", "*.json", "*.md", "*.mdx", "*.toml", "*.yml"],
"files": [".*", "*.json", "*.toml", "*.yml"],
"options": {
"useTabs": false
}
Expand Down
19 changes: 10 additions & 9 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
import { defineConfig } from "astro/config";
import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
import remarkBreaks from "remark-breaks";
import mdx from "@astrojs/mdx";
import sitemap from "@astrojs/sitemap";

// https://astro.build/config
import codeBlockPlugin from "./tools/remark-code-quote";
import wrapH2WithSection from "./tools/rehype-wrap-h2-with-section";
import { astroLastModifiedAt } from "./tools/remark-astro-last-modified-at";
Comment on lines +5 to +7
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Imported modules are missing in the tools directory.

The files remark-code-quote.js, rehype-wrap-h2-with-section.js, and remark-astro-last-modified-at.js referenced in astro.config.mjs do not exist. This will lead to import errors and potential runtime failures.

  • Ensure that these modules are added to the tools directory.
  • Verify that the file paths and names are correct in the import statements.
🔗 Analysis chain

LGTM! Verify the imported modules.

The new imports for custom plugins look good. They follow a consistent naming convention and are appropriately imported from local files.

To ensure the imported modules exist and are correctly implemented, run the following script:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence and basic structure of the imported modules

# Test: Check if the files exist and contain expected content
for file in "tools/remark-code-quote.js" "tools/rehype-wrap-h2-with-section.js" "tools/remark-astro-last-modified-at.js"; do
  if [ -f "$file" ]; then
    echo "File $file exists."
    grep -q "export default" "$file" && echo "  - Contains default export." || echo "  - Warning: No default export found."
  else
    echo "Warning: File $file does not exist."
  fi
done

Length of output: 923


// https://astro.build/config
export default defineConfig({
// site: 'https://example.com',
site: "https://wagomu.me",
integrations: [mdx(), sitemap()],
integrations: [mdx(), sitemap(), tailwind()],
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Add Tailwind import.

The addition of tailwind() to the integrations is good, but the tailwind function is not imported at the top of the file.

Add the following import at the top of the file:

+import tailwind from "@astrojs/tailwind";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
integrations: [mdx(), sitemap(), tailwind()],
import tailwind from "@astrojs/tailwind";
integrations: [mdx(), sitemap(), tailwind()],

vite: {
plugins: [vanillaExtractPlugin()],
plugins: []
},
markdown: {
remarkPlugins: [remarkBreaks],
remarkPlugins: [remarkBreaks, codeBlockPlugin, astroLastModifiedAt],
rehypePlugins: [wrapH2WithSection],
shikiConfig: {
theme: "github-light",
},
},
theme: "github-light"
}
}
});
40 changes: 17 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,31 @@
"lint:check": "eslint src",
"lint:fix": "eslint --fix src",
"precommit": "pnpm build",
"prettier:fix": "prettier --write --plugin-search-dir=. src",
"prettier:check": "prettier --check --plugin-search-dir=. "
"format": "prettier --write --plugin-search-dir=. src",
"format:check": "prettier --check --plugin-search-dir=. "
},
"husky": {
"hooks": {
"pre-commit": "precommit"
}
},
"dependencies": {
"@astrojs/mdx": "^2.3.1",
"@astrojs/rss": "^4.0.5",
"@astrojs/sitemap": "^3.1.4",
"@vanilla-extract/css": "^1.13.0",
"astro": "^4.7.0",
"mdx": "^0.3.1",
"remark-breaks": "^4.0.0"
},
"devDependencies": {
"@markuplint/astro-parser": "^4.0.0",
"@vanilla-extract/vite-plugin": "^3.9.0",
"@astrojs/check": "^0.9.3",
"@astrojs/mdx": "4.0.0-beta.1",
"@astrojs/rss": "^4.0.7",
"@astrojs/sitemap": "^3.1.6",
"@markuplint/astro-parser": "^4.6.5",
"astro": "5.0.0-beta.2",
"cheerio": "1.0.0-rc.12",
"husky": "^9.0.0",
"markuplint": "^3.12.0",
"prettier": "^3.0.2",
"husky": "^9.0.11",
"markuplint": "^3.15.0",
"mdx": "^0.3.1",
"prettier": "^3.3.2",
"prettier-plugin-astro": "^0.11.1",
"textlint": "^13.3.3",
"textlint-filter-rule-comments": "^1.2.2",
"textlint-rule-ja-space-around-link": "^2.2.0",
"textlint-rule-preset-ja-spacing": "^2.3.0",
"textlint-rule-preset-ja-technical-writing": "^10.0.0",
"textlint-rule-prh": "^6.0.0",
"typescript": "^5.2.2"
"remark-breaks": "^4.0.0",
"typescript": "^5.4.5"
},
"dependencies": {
"gsap": "^3.12.5"
}
}
Loading
Loading