Skip to content

Commit

Permalink
feat: markdown transform ja
Browse files Browse the repository at this point in the history
  • Loading branch information
pei-pay committed Apr 14, 2024
1 parent 609e9d3 commit 9d59b6d
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/.vitepress/config/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ const sidebar: i18nTheme['sidebar'] = {
'ja/guide/': DefaultSideBar,
'ja/functions': FunctionsSideBar,
// TODO: ja
'/core/': FunctionsSideBar,
'/shared/': FunctionsSideBar,
'ja/core/': FunctionsSideBar,
'ja/shared/': FunctionsSideBar,
}

export const ja: i18nTheme = { nav, sidebar }
Expand Down
3 changes: 2 additions & 1 deletion packages/.vitepress/plugins/markdownTransform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export async function getFunctionMarkdown(pkg: string, name: string) {
const URL = `${GITHUB_BLOB_URL}/${pkg}/${name}`

const dirname = join(DIR_SRC, pkg, name)
console.log("🚀 ~ getFunctionMarkdown ~ dirname:", dirname)

Check failure on line 56 in packages/.vitepress/plugins/markdownTransform.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected console statement

Check failure on line 56 in packages/.vitepress/plugins/markdownTransform.ts

View workflow job for this annotation

GitHub Actions / lint

Strings must use singlequote
const demoPath = ['demo.vue'].find(i => fs.existsSync(join(dirname, i)))

const links = ([
Expand All @@ -68,7 +69,7 @@ export async function getFunctionMarkdown(pkg: string, name: string) {
const demoSection = demoPath
? `
<script setup>
import Demo from \'./${demoPath}\'
import Demo from \'${dirname}/${demoPath}\'
</script>
## Demo
Expand Down
10 changes: 10 additions & 0 deletions packages/ja/core/useManualRefHistory/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
category: State
related: useRefHistory
---

# useManualRefHistory

`commit()` を呼び出すときに ref の変更履歴を手動で追跡し、また、元に戻す (undo) およびやり直す (redo) 機能を提供します。

## How to make
10 changes: 10 additions & 0 deletions packages/ja/shared/watchIgnorable/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
category: Watch
alias: ignorableWatch
---

# watchIgnorable

<!-- TODO: write how to make in ja -->

これはテストテキストです

Check failure on line 10 in packages/ja/shared/watchIgnorable/index.md

View workflow job for this annotation

GitHub Actions / lint

Newline required at end of file but not found
4 changes: 4 additions & 0 deletions packages/shared/watchIgnorable/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ alias: ignorableWatch
---

# watchIgnorable

<!-- TODO: write how to make -->

This is a test text

Check failure on line 10 in packages/shared/watchIgnorable/index.md

View workflow job for this annotation

GitHub Actions / lint

Newline required at end of file but not found

0 comments on commit 9d59b6d

Please sign in to comment.