Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
95f38b6
✨ feat: [plugin] astro-expressive-code
riiimparm Aug 4, 2026
b70f92d
chore: code block theme変更
riiimparm Aug 10, 2026
18f4614
style: custome astro-expressive-code
riiimparm Aug 10, 2026
1fdb21a
style: format
riiimparm Aug 10, 2026
134fee2
fix: リンクカードのOGP画像未取得時にダミー画像へフォールバック
riiimparm Aug 13, 2026
eb282e3
✨ feat: GitHub風アラート引用記法(callout)に対応
riiimparm Aug 13, 2026
0bad1a6
✨ feat: 未対応種別の callout をデフォルトスタイルにフォールバック
riiimparm Aug 13, 2026
b370c8d
docs: リンクカードOGPフォールバック検証用デモ記事を追加
riiimparm Aug 13, 2026
e0aec3a
📃 docs: コールアウト記法の恒久的な検証用デモ記事を追加
riiimparm Aug 13, 2026
2be0133
docs: PRレビュー用の動作証跡スクリーンショットを追加
riiimparm Aug 13, 2026
9a1a90d
docs: PRレビュー用の動作証跡スクリーンショットを追加
riiimparm Aug 13, 2026
e335c4c
style: prettierフォーマットを適用
riiimparm Aug 13, 2026
8096cc7
style: prettierフォーマットを適用
riiimparm Aug 13, 2026
9d795d5
revert: PR対象外のデモ記事を削除
riiimparm Aug 13, 2026
b8c94fc
revert: PR対象外のデモ記事を削除
riiimparm Aug 13, 2026
1f9aa9c
revert: PR対象外の証跡画像を削除
riiimparm Aug 13, 2026
42104b0
revert: PR対象外の証跡画像を削除
riiimparm Aug 13, 2026
3906d2d
refactor: コールアウトを1種類のシンプルな実装に簡略化
riiimparm Aug 13, 2026
abef6db
Enhance README with Markdown and Mermaid details
riiimparm Aug 13, 2026
3be0d7f
Merge pull request #177 from rowicy/feature/design-code-block
riiimparm Aug 13, 2026
647d7bf
fix: ダミー画像URLをdata URIにしローカル開発でも表示されるようにする
riiimparm Aug 13, 2026
23d0e21
chore: フォールバック画像をロゴ入りのものに差し替え
riiimparm Aug 13, 2026
8cc1592
Merge remote-tracking branch 'origin/develop' into feature/callout-bl…
riiimparm Aug 14, 2026
376fe94
README更新
riiimparm Aug 14, 2026
1ca4f97
Merge pull request #183 from rowicy/feature/link-card-ogp-fallback
riiimparm Aug 20, 2026
124aff2
Merge pull request #186 from rowicy/feature/callout-blockquote
riiimparm Aug 22, 2026
cb9d1a9
🔧 build(#189): upgrade astro ver 5 to 7
naoki-00-ito Aug 22, 2026
f4eb73c
Merge branch 'develop' into feature/#189
naoki-00-ito Aug 22, 2026
c913b7b
🌈 style(#189): astro.config format
naoki-00-ito Aug 22, 2026
8127687
🐞 fix(#189): ls-lint ignore file
naoki-00-ito Aug 22, 2026
b372603
Merge pull request #190 from rowicy/feature/#189
naoki-00-ito Aug 22, 2026
eddd4ce
🔧 build: CIのpnpmインストールを決定的にし、無駄な実行をキャンセルする
riiimparm Aug 29, 2026
c96c57d
Merge pull request #191 from rowicy/fix/ci-pnpm-frozen-install
riiimparm Sep 1, 2026
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
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: 'Test'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
branches:
Expand All @@ -13,15 +17,13 @@ jobs:
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
with:
version: 8
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Check with Prettier
run: pnpm run format:check
- name: Check with Astro
Expand Down
4 changes: 3 additions & 1 deletion .ls-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ ignore:
- .astro
- .git
- .vscode
- dist
- node_modules
- src/pages/**/*/\[slug\].astro
- src/pages/**/*/\[id\].astro
- src/pages/**/*/\[name\].astro
- src/pages/**/*/\[tag\].astro
- src/content/blog/_template
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v24.12.0
v24.19.0
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,42 @@ pnpm preview
pnpm format
```

## 記事内MD記法

### 基本

標準的な Markdown 記法(見出し、リスト、リンク等)に対応しています。

### コールアウト

`> [!xxx]`でコールアウト記法を使用できます。

### コードブロック

コードブロックの言語指定以降に以下属性を付与することで、多様なマーカーや装飾を追加できます。

| 属性 | 用途 | 例 |
| ----------------------- | ---------------- | ------------------------- |
| 先頭行のファイル名コメント | ファイルパス/タイトルを自動推測 | ```ts の1行目に // src/a.ts |
| title="..." | ファイルパス/タイトル表示 | ```ts title="src/a.ts" |
| {2-4} | マーカーライン(行ハイライト) | ```ts {2-4} |
| ins={n} / del={n} | 行単位の追加/削除マーカー | ```ts ins={2} del={3} |
| "word" / /regex/ | ワードマーカー | ```ts "greet" /Hi.*!/ |
| ins="word" / del="word" | 単語単位の追加/削除マーカー | ```ts ins="foo" del="bar" |
| wrap | 長い行の折り返し | ```ts wrap |
| frame="terminal" | ターミナル風フレーム | ```bash frame="terminal" |
| showLineNumbers | 行番号表示 | ```ts showLineNumbers |
| collapse={1-3} | 指定行の折りたたみ | ```ts collapse={1-3} |
| ```diff | diff構文(+/-表示) | ```diff title="x.ts" |

さらに詳しく [Text & Line Markers](https://expressive-code.com/key-features/text-markers/)


### ダイアグラム(Mermaid)

コードブロックの言語指定に `mermaid` を記述することで、フローチャートやシーケンス図などをレンダリングできます。


## ブログ記事投稿

1. ブログ記事執筆用ブランチを作成する
Expand Down
74 changes: 64 additions & 10 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { readFileSync } from 'node:fs';
import { fileURLToPath } from 'node:url';
import { defineConfig } from 'astro/config';
import react from '@astrojs/react';
import tailwind from '@astrojs/tailwind';
Expand All @@ -8,15 +10,54 @@ import rehypeSlug from 'rehype-slug';
import remarkLinkCard from 'remark-link-card-plus';
import remarkBreaks from 'remark-breaks';
import { remarkMermaidInjector } from './src/plugins/remark/remark-mermaid-injector.mjs';
import { remarkCallout } from './src/plugins/remark/remark-callout.mjs';
import expressiveCode from 'astro-expressive-code';
import { unified } from '@astrojs/markdown-remark';

const SITE_URL = 'https://www.rowicy.com';
// data URIはURL.canParse()を通り、かつdev/build/prodのどの環境・ポートでも
// そのまま表示できるため、ホスト名に依存する絶対URLより確実(svgは537byteと小さい)。
const LINK_CARD_FALLBACK_IMAGE_URL = `data:image/svg+xml;base64,${readFileSync(
fileURLToPath(
new URL('./public/images/link-card-fallback.svg', import.meta.url)
)
).toString('base64')}`;

// https://astro.build/config
export default defineConfig({
site: 'https://www.rowicy.com',
site: SITE_URL,
prefetch: {
prefetchAll: true,
},
integrations: [
react(),
expressiveCode({
themes: ['vesper'],
frames: {
showCopyToClipboardButton: false,
},
customizeTheme: theme => {
theme.bg = '#14151a';
theme.colors['editor.background'] = '#14151a';
theme.settings
.filter(s =>
(Array.isArray(s.scope) ? s.scope : [s.scope]).some(scope =>
scope?.includes('comment')
)
)
.forEach(s => {
s.settings.foreground = '#6b7089';
});
},
styleOverrides: {
borderWidth: '0px',
codeBackground: '#0C1222',
frames: {
editorBackground: '#262B30',
terminalBackground: '#262B30',
},
},
}),
tailwind({
applyBaseStyles: false,
}),
Expand All @@ -28,15 +69,28 @@ export default defineConfig({
}),
],
markdown: {
excludeLangs: ['mermaid'],
rehypePlugins: [rehypeSlug, [rehypeToc, { headings: ['h2', 'h3', 'h4'] }]],
remarkPlugins: [
remarkMermaidInjector,
remarkBreaks,
[
remarkLinkCard,
{ cache: false, shortenUrl: true, thumbnailPosition: 'left' },
processor: unified({
rehypePlugins: [
rehypeSlug,
[rehypeToc, { headings: ['h2', 'h3', 'h4'] }],
],
remarkPlugins: [
remarkMermaidInjector,
remarkBreaks,
remarkCallout,
[
remarkLinkCard,
{
cache: false,
shortenUrl: true,
thumbnailPosition: 'left',
ogTransformer: og => {
if (og.imageUrl && URL.canParse(og.imageUrl)) return og;
return { ...og, imageUrl: LINK_CARD_FALLBACK_IMAGE_URL };
},
},
],
],
],
}),
},
});
17 changes: 10 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"type": "module",
"version": "0.0.1",
"private": true,
"packageManager": "pnpm@10.19.0",
"engines": {
"node": "24.12.0"
"node": "24.19.0"
},
"scripts": {
"preinstall": "npx only-allow pnpm",
Expand All @@ -21,10 +22,11 @@
"set-nvm": "nvm use $(cat .nvmrc)"
},
"dependencies": {
"@astrojs/check": "^0.9.6",
"@astrojs/react": "^4.4.2",
"@astrojs/rss": "^4.0.14",
"@astrojs/sitemap": "^3.6.0",
"@astrojs/check": "^0.9.10",
"@astrojs/markdown-remark": "^7.2.4",
"@astrojs/react": "^6.0.4",
"@astrojs/rss": "^4.0.19",
"@astrojs/sitemap": "^3.7.3",
"@astrojs/tailwind": "^6.0.2",
"@fontsource-variable/inter": "^5.0.18",
"@fontsource-variable/noto-sans-jp": "^5.0.19",
Expand All @@ -38,7 +40,8 @@
"@radix-ui/react-tooltip": "^1.2.8",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"astro": "^5.16.4",
"astro": "^7.2.4",
"astro-expressive-code": "^0.44.1",
"astro-seo": "^0.8.4",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
Expand All @@ -58,7 +61,7 @@
"typescript": "^5.4.5"
},
"devDependencies": {
"@astrojs/partytown": "^2.1.4",
"@astrojs/partytown": "^2.1.7",
"prettier": "^3.2.5",
"prettier-plugin-astro": "^0.13.0",
"prettier-plugin-tailwindcss": "^0.6.11",
Expand Down
Loading
Loading