Skip to content

Commit 0238c66

Browse files
authored
Merge pull request #61 from movabletype/fix/use_npm
Use npm and webpack-dev-server, format docs MTC-29254
2 parents 27b679e + 69ac3d8 commit 0238c66

21 files changed

+1570523
-45144
lines changed

.github/workflows/mt-docs-data-api-reference.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,9 @@ jobs:
1212
steps:
1313
- name: checkout
1414
uses: actions/[email protected]
15-
- name: Get yarn cache directory path
16-
id: yarn-cache-dir-path
17-
run: echo 'dir=$(yarn cache dir)' >> $GITHUB_OUTPUT
18-
- name: Set up yarn cache
19-
uses: actions/[email protected]
20-
with:
21-
path: "${{ steps.yarn-cache-dir-path.outputs.dir }}"
22-
key: "${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}"
23-
restore-keys: "${{ runner.os }}-yarn-"
2415
- uses: actions/[email protected]
2516
with:
2617
cache: npm
27-
node-version: '16'
18+
node-version: '20'
2819
- run: npm install
29-
- run: yarn redoc
20+
- run: npm run redoc

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
FROM node:18.10
1+
FROM node:20
22
WORKDIR /root/docs
3-
COPY package.json yarn.lock ./
4-
RUN yarn && yarn cache clean
5-
3+
COPY package.json package-lock.json ./
4+
RUN npm ci --include dev

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ install:
22
docker-compose build
33

44
build:
5-
docker-compose run --rm docs
5+
docker-compose run --rm docs bash -c 'npm run index && npm run redoc'
66

77
start-dev-server:
8-
docker-compose run docs yarn dev-server
8+
docker-compose up
99

1010
clean:
1111
docker-compose rm -f -v

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# mt-docs-data-api-reference
22

3-
[![Build Status](https://travis-ci.org/movabletype/mt-docs-data-api-reference.svg?branch=master)](https://travis-ci.org/movabletype/mt-docs-data-api-reference)
4-
53
## Usage
64

75
### Install
@@ -14,8 +12,6 @@ $ make install
1412

1513
### Build HTML files
1614

17-
* Run aglio command
18-
1915
```sh
2016
$ make build
2117
```

build-index.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ $(npx marked -i src/markdown/index_sidebar.md)
3131
</div>
3232
</div>
3333
</div>
34-
</main>
3534
<footer class="footer">
3635
<span>© Six Apart Ltd.</span>
3736
</footer>

docker-compose.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ version: '3'
22
services:
33
docs:
44
build: .
5-
command: sh -c "yarn index && yarn redoc"
5+
command: sh -c 'npm run webpack serve'
66
volumes:
77
- .:/root/docs
88
- /root/docs/node_modules
9-
9+
ports:
10+
- 8080:8080

docs/assets/main.js

Lines changed: 563 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.html

Lines changed: 144 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,148 @@
11
<!doctype html>
22
<html>
3-
<head>
4-
<meta charset="utf-8">
5-
<meta name="viewport" content="width=device-width, initial-scale=1">
6-
<title>Movable Type Data API</title>
7-
<script src="assets/main.js"></script>
8-
</head>
9-
<body>
10-
<header>
11-
<a href="https://movabletype.jp/">
12-
<img src="https://movabletype.jp/assets/images/mtlogo.svg" alt="Movable Type">
13-
</a>
14-
</header>
15-
<div class="container">
16-
<div class="row">
17-
<div class="col-md-9">
18-
<main>
19-
<h1 id="data-api-ドキュメント">Data API ドキュメント</h1>
20-
<h2 id="はじめに">はじめに</h2>
21-
<ul>
22-
<li><a href="https://www.movabletype.jp/developers/data-api/getting-started/">はじめに</a></li>
23-
<li><a href="https://www.movabletype.jp/developers/data-api/quick-start/">クイック スタート ガイド</a></li>
24-
</ul>
25-
<h2 id="api-リファレンス">API リファレンス</h2>
26-
<ul>
27-
<li><a href="v1.html">API リファレンス (v1)</a></li>
28-
<li><a href="v2.html">API リファレンス (v2)</a></li>
29-
<li><a href="v3.html">API リファレンス (v3)</a></li>
30-
<li><a href="v4.html">API リファレンス (v4)</a></li>
31-
<li><a href="v5.html">API リファレンス (v5)</a></li>
32-
<li><a href="v6.html">API リファレンス (v6)</a></li>
33-
</ul>
34-
<h2 id="sdk">SDK</h2>
35-
<ul>
36-
<li><a href="https://github.com/movabletype/mt-data-api-sdk-js/wiki/DataAPI-SDK-japanese-MT.DataAPI">JavaScript SDK</a></li>
37-
<li><a href="https://github.com/movabletype/mt-data-api-sdk-swift">Swift SDK</a></li>
38-
</ul>
39-
</main>
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
<title>Movable Type Data API</title>
7+
<script src="assets/main.js"></script>
8+
</head>
9+
<body>
10+
<header>
11+
<a href="https://movabletype.jp/">
12+
<img
13+
src="https://movabletype.jp/assets/images/mtlogo.svg"
14+
alt="Movable Type"
15+
/>
16+
</a>
17+
</header>
18+
<div class="container">
19+
<div class="row">
20+
<div class="col-md-9">
21+
<main>
22+
<h1 id="data-api-ドキュメント">Data API ドキュメント</h1>
23+
<h2 id="はじめに">はじめに</h2>
24+
<ul>
25+
<li>
26+
<a
27+
href="https://www.movabletype.jp/developers/data-api/getting-started/"
28+
>はじめに</a
29+
>
30+
</li>
31+
<li>
32+
<a
33+
href="https://www.movabletype.jp/developers/data-api/quick-start/"
34+
>クイック スタート ガイド</a
35+
>
36+
</li>
37+
</ul>
38+
<h2 id="api-リファレンス">API リファレンス</h2>
39+
<ul>
40+
<li><a href="v1.html">API リファレンス (v1)</a></li>
41+
<li><a href="v2.html">API リファレンス (v2)</a></li>
42+
<li><a href="v3.html">API リファレンス (v3)</a></li>
43+
<li><a href="v4.html">API リファレンス (v4)</a></li>
44+
<li><a href="v5.html">API リファレンス (v5)</a></li>
45+
<li><a href="v6.html">API リファレンス (v6)</a></li>
46+
</ul>
47+
<h2 id="sdk">SDK</h2>
48+
<ul>
49+
<li>
50+
<a
51+
href="https://github.com/movabletype/mt-data-api-sdk-js/wiki/DataAPI-SDK-japanese-MT.DataAPI"
52+
>JavaScript SDK</a
53+
>
54+
</li>
55+
<li>
56+
<a href="https://github.com/movabletype/mt-data-api-sdk-swift"
57+
>Swift SDK</a
58+
>
59+
</li>
60+
</ul>
61+
</main>
62+
</div>
63+
<div class="col-md-3">
64+
<aside>
65+
<nav>
66+
<h3 id="カテゴリ">カテゴリ</h3>
67+
<ul>
68+
<li>
69+
<a href="https://www.movabletype.jp/developers/data-api/"
70+
>Movable Type Data API</a
71+
>
72+
</li>
73+
<li>
74+
<a
75+
href="https://github.com/movabletype/mt-data-api-sdk-js/wiki/DataAPI-SDK-japanese-MT.DataAPI"
76+
>Movable Type Data API SDK ガイド</a
77+
>
78+
</li>
79+
<li>
80+
<a
81+
href="https://github.com/movabletype/Documentation/wiki/Japanese-developer-guide"
82+
>プラグイン開発</a
83+
>
84+
</li>
85+
<li>
86+
<a
87+
href="https://www.movabletype.jp/documentation/mt6/developer/theme/"
88+
>テーマ開発</a
89+
>
90+
</li>
91+
<li>
92+
<a
93+
href="https://github.com/movabletype/Documentation/wiki/Movable-Type-Chart-API"
94+
>Movable Type Chart API</a
95+
>
96+
</li>
97+
</ul>
98+
<h3 id="リファレンス">リファレンス</h3>
99+
<ul>
100+
<li>
101+
<a
102+
href="https://movabletype.jp/documentation/appendices/tags/"
103+
>テンプレートタグ</a
104+
>
105+
</li>
106+
<li>
107+
<a
108+
href="https://movabletype.jp/documentation/appendices/modifiers/"
109+
>グローバルモディファイア</a
110+
>
111+
</li>
112+
<li>
113+
<a
114+
href="https://movabletype.jp/documentation/appendices/config-directives/"
115+
>環境変数</a
116+
>
117+
</li>
118+
</ul>
119+
<h3 id="関連リンク">関連リンク</h3>
120+
<ul>
121+
<li>
122+
<a href="https://www.sixapart.jp/movabletype/news/"
123+
>Movable Type News</a
124+
>
125+
</li>
126+
<li><a href="https://movabletype.jp/blog/">ブログ</a></li>
127+
<li>
128+
<a href="https://movabletype.jp/release-notes/"
129+
>リリースノート</a
130+
>
131+
</li>
132+
<li>
133+
<a href="https://plugins.movabletype.jp/"
134+
>プラグイン・テーマディレクトリ</a
135+
>
136+
</li>
137+
<li><a href="https://www.sixapart.jp/jobs/">人材募集</a></li>
138+
</ul>
139+
</nav>
140+
</aside>
141+
</div>
142+
</div>
40143
</div>
41-
<div class="col-md-3">
42-
<aside>
43-
<nav>
44-
<h3 id="カテゴリ">カテゴリ</h3>
45-
<ul>
46-
<li><a href="https://www.movabletype.jp/developers/data-api/">Movable Type Data API</a></li>
47-
<li><a href="https://github.com/movabletype/mt-data-api-sdk-js/wiki/DataAPI-SDK-japanese-MT.DataAPI">Movable Type Data API SDK ガイド</a></li>
48-
<li><a href="https://github.com/movabletype/Documentation/wiki/Japanese-developer-guide">プラグイン開発</a></a></li></li>
49-
<li><a href="https://www.movabletype.jp/documentation/mt6/developer/theme/">テーマ開発</a></li>
50-
<li><a href="https://github.com/movabletype/Documentation/wiki/Movable-Type-Chart-API">Movable Type Chart API</a></li>
51-
</ul>
52-
<h3 id="リファレンス">リファレンス</h3>
53-
<ul>
54-
<li><a href="https://movabletype.jp/documentation/appendices/tags/">テンプレートタグ</a></li>
55-
<li><a href="https://movabletype.jp/documentation/appendices/modifiers/">グローバルモディファイア</a></li>
56-
<li><a href="https://movabletype.jp/documentation/appendices/config-directives/">環境変数</a></li>
57-
</ul>
58-
<h3 id="関連リンク">関連リンク</h3>
59-
<ul>
60-
<li><a href="https://www.sixapart.jp/movabletype/news/">Movable Type News</a></li>
61-
<li><a href="https://movabletype.jp/blog/">ブログ</a></li>
62-
<li><a href="https://movabletype.jp/release-notes/">リリースノート</a></li>
63-
<li><a href="https://plugins.movabletype.jp/">プラグイン・テーマディレクトリ</a></li>
64-
<li><a href="https://www.sixapart.jp/jobs/">人材募集</a></li>
65-
</ul>
66-
</nav>
67-
</aside>
68-
</div>
69-
</div>
70-
</div>
71-
</main>
72-
<footer class="footer">
73-
<span>© Six Apart Ltd.</span>
74-
</footer>
75-
</body>
144+
<footer class="footer">
145+
<span>© Six Apart Ltd.</span>
146+
</footer>
147+
</body>
76148
</html>

0 commit comments

Comments
 (0)