Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 2881587

Browse files
committed
fix(deploy): add args for gh-pages
1 parent 62b5306 commit 2881587

File tree

5 files changed

+23
-5
lines changed

5 files changed

+23
-5
lines changed

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ Just write Markdown and create cool slides.😎
2525
- Supports SEO and OGP
2626
- Generates ogp image automatically
2727
- Customizes JavaScript and CSS freely
28+
- Adds a Sidebar on Slides
29+
- share buttons
30+
- ToC
2831

2932
## Modes
3033

@@ -97,6 +100,10 @@ When `npx fusuma start` is executed, fusuma will create a slide as follows and s
97100

98101
![](./site/docs/assets/procedure-screenshot.png)
99102

103+
And fusuma adds a Sidebar like below.
104+
105+
![](./site/docs/assets/sidebar.png)
106+
100107
## Markdown and MDX
101108

102109
```markdown

packages/fusuma/src/tasks/deploy.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
const loader = require('../cli/loader');
44
const { info } = require('../cli/log');
55

6-
async function deploy(config) {
6+
async function deploy(config, options = {}) {
77
const ghpages = require('gh-pages');
88

99
return new Promise((resolve, reject) => {
1010
const spinner = loader('Publishing to gh-pages...').start();
1111
const { basePath, outputDirPath } = config.internal;
1212

13-
ghpages.publish(outputDirPath, (err) => {
13+
ghpages.publish(outputDirPath, options, (err) => {
1414
if (err) {
1515
reject(err);
1616
} else {

samples/intro/.fusumarc.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
meta:
2-
url: 'http://localhost:8080'
2+
url: https://hiroppy.github.io/fusuma/intro
33
title: What's Fusuma?
44
description: Introduce Fusuma
55
siteName: hiroppy.me
@@ -18,3 +18,4 @@ extends:
1818
css: style.css
1919
build:
2020
useCache: false
21+
publicPath: /fusuma/intro/

scripts/deploy-samples.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const { readdirSync, statSync } = require('fs');
44
const { join } = require('path');
5-
const deploy = require('../packages/task-ghp/src');
5+
const deploy = require('../packages/fusuma/src/tasks/deploy');
66

77
const getDirs = (p) => readdirSync(p).filter((f) => statSync(join(p, f)).isDirectory());
88

@@ -11,6 +11,16 @@ const getDirs = (p) => readdirSync(p).filter((f) => statSync(join(p, f)).isDirec
1111
const dirs = getDirs(base);
1212

1313
for (let i = 0; i < dirs.length; i++) {
14-
await deploy(join(join(base, dirs[i]), 'dist'), { dest: dirs[i] });
14+
await deploy(
15+
{
16+
internal: {
17+
basePath: base,
18+
outputDirPath: join(join(base, dirs[i]), 'dist'),
19+
},
20+
},
21+
{
22+
dest: dirs[i],
23+
}
24+
);
1525
}
1626
})();

site/docs/assets/sidebar.png

155 KB
Loading

0 commit comments

Comments
 (0)