File tree Expand file tree Collapse file tree 1 file changed +57
-12
lines changed
Expand file tree Collapse file tree 1 file changed +57
-12
lines changed Original file line number Diff line number Diff line change @@ -7,27 +7,60 @@ import { notFound } from "next/navigation";
77import crypto from "node:crypto" ;
88
99export interface MarkdownSection {
10- file : string ; // ファイル名
10+ /**
11+ * セクションのmdファイル名
12+ */
13+ file : string ;
14+ /**
15+ * frontmatterに書くセクションid
16+ * (データベース上の sectionId)
17+ */
1118 id : string ;
1219 level : number ;
1320 title : string ;
14- rawContent : string ; // 見出しも含めたもとのmarkdownの内容
15- md5 : string ; // mdファイル全体のmd5
16- }
17-
18- export interface PageEntry {
19- index : number ;
20- slug : string ;
21- name : string ;
22- title : string ;
21+ /**
22+ * frontmatterを除く、見出しも含めたもとのmarkdownの内容
23+ */
24+ rawContent : string ;
25+ /**
26+ * rawContentのmd5ハッシュのbase64エンコード
27+ */
28+ md5 : string ;
2329}
2430
31+ /**
32+ * 各言語のindex.ymlから読み込んだデータにid,index等を追加したデータ型
33+ */
2534export interface LanguageEntry {
35+ /**
36+ * public/docs/にある言語のディレクトリ名をidとして用いる
37+ */
2638 id : string ;
39+ /**
40+ * 言語の表示名
41+ */
2742 name : string ;
2843 description : string ;
2944 pages : PageEntry [ ] ;
3045}
46+ export interface PageEntry {
47+ /**
48+ * 章番号、0からはじまる連番
49+ */
50+ index : number ;
51+ /**
52+ * 章のディレクトリ名。
53+ */
54+ slug : string ;
55+ /**
56+ * 章の短いタイトル
57+ */
58+ name : string ;
59+ /**
60+ * 章の長いタイトル
61+ */
62+ title : string ;
63+ }
3164
3265interface IndexYml {
3366 name : string ;
@@ -40,12 +73,24 @@ interface IndexYml {
4073}
4174
4275export interface RevisionYmlEntry {
76+ /**
77+ * `langId/pageSlug`
78+ */
4379 page : string ;
4480 rev : SectionRevision [ ] ;
4581}
4682export interface SectionRevision {
47- md5 : string ; // mdファイル全体のmd5
48- git : string ; // git上のコミットハッシュ
83+ /**
84+ * rawContentのmd5ハッシュ
85+ */
86+ md5 : string ;
87+ /**
88+ * git上のコミットid
89+ */
90+ git : string ;
91+ /**
92+ * リポジトリのルートからの、セクションのmdファイルのパス
93+ */
4994 path : string ;
5095}
5196
You can’t perform that action at this time.
0 commit comments