Skip to content

Commit db81019

Browse files
committed
Switch to VitePress
Signed-off-by: Andrew Welch <andrew@nystudio107.com>
1 parent 646e8e3 commit db81019

File tree

7 files changed

+1202
-10501
lines changed

7 files changed

+1202
-10501
lines changed

docs/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
ARG TAG=14-alpine
2+
FROM nystudio107/node-dev-base:$TAG
3+
4+
WORKDIR /app/
5+
6+
CMD ["run build"]
7+
8+
ENTRYPOINT ["npm"]

docs/Makefile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
TAG?=14-alpine
2+
CONTAINER?=$(shell basename $(dir $(CURDIR)))-docs
3+
DOCKERRUN=docker container run \
4+
--name ${CONTAINER} \
5+
--rm \
6+
-p 3000:3000 \
7+
-t \
8+
-v `pwd`:/app \
9+
${CONTAINER}:${TAG}
10+
DOCSDEST?=../../../sites/nystudio107/web/docs/transcoder
11+
12+
.PHONY: docker build dev install update npm
13+
14+
docker:
15+
docker build \
16+
. \
17+
-t ${CONTAINER}:${TAG} \
18+
--build-arg TAG=${TAG} \
19+
--no-cache
20+
build: docker install update
21+
${DOCKERRUN} \
22+
run docs:build
23+
rm -rf ${DOCSDEST}
24+
mv ./docs/.vitepress/dist ${DOCSDEST}
25+
dev: docker install
26+
${DOCKERRUN} \
27+
run docs:dev
28+
install: docker
29+
${DOCKERRUN} \
30+
install
31+
update: docker
32+
${DOCKERRUN} \
33+
update
34+
npm: docker
35+
${DOCKERRUN} \
36+
$(filter-out $@,$(MAKECMDGOALS))
37+
%:
38+
@:
39+
# ref: https://stackoverflow.com/questions/6273608/how-to-pass-argument-to-makefile-from-command-line

docs/docs/.vitepress/config.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
module.exports = {
2+
title: 'Transcoder Documentation',
3+
description: 'Documentation for the Transcoder plugin',
4+
base: '/docs/vite/',
5+
lang: 'en-US',
6+
themeConfig: {
7+
repo: 'nystudio107/craft-transcoder',
8+
docsDir: 'docs',
9+
algolia: {
10+
apiKey: '',
11+
indexName: 'craft-transcoder'
12+
},
13+
editLinks: true,
14+
editLinkText: 'Edit this page on GitHub',
15+
lastUpdated: 'Last Updated',
16+
sidebar: [
17+
{ text: 'Transcoder Plugin', link: '/index' },
18+
{ text: 'Transcoder Overview', link: '/overview' },
19+
{ text: 'Configuring Transcoder', link: '/configuring' },
20+
{ text: 'Using Transcoder', link: '/using' },
21+
],
22+
},
23+
};

docs/docs/.vuepress/config.js

Lines changed: 0 additions & 14 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)