Skip to content

Commit 6f3b204

Browse files
authored
fix(asciidoc logging): hide the asciidocs logging (#68)
This pr hides the asciidoc warings and errors. closes #61
1 parent a73a780 commit 6f3b204

3 files changed

Lines changed: 29 additions & 2 deletions

File tree

extraPlugin/extra-plugin.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
const {configValidator, routeSplit} = require('../scully/bin');
22

3+
console.log(__dirname);
4+
35
const extraRoutesPlugin = (route, options) => {
46
const {createPath} = routeSplit(route);
57
if (options.numberOfPages) {

scully/fileHanderPlugins/asciidoc.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
const asciidoctor = require('asciidoctor.js')();
22
import {registerPlugin} from '../pluginManagement/pluginRepository';
3+
const loggerManager = asciidoctor.LoggerManager
4+
const memoryLogger = asciidoctor.MemoryLogger.create();
5+
loggerManager.setLogger(memoryLogger);
36

47
const asciiDocPlugin = async (raw: string) => {
5-
return asciidoctor.convert(raw);
8+
return asciidoctor.convert(raw, {});
69
};
710

811
registerPlugin('fileHandler', 'adoc', {
912
alternateExtensions: ['asciidoc', 'asc'],
1013
handler: asciiDocPlugin,
1114
});
12-

scully/package-lock.json

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)