yakivmospan / github-wikito-converter Goto Github PK
View Code? Open in Web Editor NEWThis project forked from limedocs/limedocs-wiki-converter
Generate HTML & PDF documentation from Github wiki or any other markdown-based wiki.
License: Other
This project forked from limedocs/limedocs-wiki-converter
Generate HTML & PDF documentation from Github wiki or any other markdown-based wiki.
License: Other
The programe not support *.md filename contain chinese characters .If anyone can help?
@yakivmospan
Could be related to wkhtmltopdf?
I'm using wkhtmltox-0.12.4_osx-cocoa-x86-64.pkg
, my mac is set to high resolution (text scaled to be small).
So when I run :
gwtc ./github-wikito-converter.wiki
I get pages that look like the image below, nothing like the sample pdfs here in the project
I've reduced the resolution for my mac to see if this has any effect, made the text as large as possible and regenerated the documentation again. but I still get the same result.
Is this something that could be fixed using wikito converter flags?
.gif inlining is not working as expected
$ sudo npm install -g github-wikito-converter
/usr/bin/gwtc -> /usr/lib/node_modules/github-wikito-converter/dist/cli/gwtc.js
+ [email protected]
added 40 packages from 304 contributors in 7.572s
$ git clone https://github.com/aol/moloch.wiki.git
$ gwtc -v moloch.wiki/
debug: gwc launched with options format=html, output=./, filename=documentation, title=Documentation , logoImage=null, footer=null, pdfPageCount=null, tocFile=null, tocLevel=3, highlightTheme=github, userCssFile=null, verbose=true, disableInlineAssets=false
debug: Found 17 markdown files and 17 links pointing to them in TOC
debug: Generating html: 15 pages to generate
info: html file written: documentation.html
documentation.html
$ grep .gif documentation.html |tail -n 4
<p><a href="#SingleHostMoloch.gif">SingleHostMoloch.gif</a></p>
<p><a href="#MultiHostMoloch.gif">MultiHostMoloch.gif</a></p>
<p><a href="#HighTrafficMoloch.gif">HighTrafficMoloch.gif</a></p>
<p><a href="#MultiClusterMoloch.gif">MultiClusterMoloch.gif</a></p>
Expected result : the 4 .gif should be inlined (see https://github.com/aol/moloch/wiki/Architecture#single-host )
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.5 (stretch)
Release: 9.5
Codename: stretch
$ nodejs --version
v10.13.0
Using version: 1.3.0
Using gwtc like this: gwtc -f pdf ./MySoftware.wiki
Gives me this error:
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at _errnoException (util.js:999:13)
at WriteWrap.afterWrite [as oncomplete] (net.js:883:14)```
HTML works fine. Any suggestions? Thank you so much
Thanks @yakivmospan for a great tool, after trying it on a Github wiki, I thought I would try it on Gitlab.
When I've tried it on a Gitlab repo wiki, it seemed to detect all the files and TOC fine, except it just errors out on Unhandled rejection Error: Unknown language: "text"
🤔
here is the complete command and complete output.
gwtc -v ./mkvtoolnix.wiki
debug: gwc launched with options format=html, output=./, filename=documentation, title=Documentation , logoImage=null, footer=null, pdfPageCount=null, tocFile=null, tocLevel=3, highlightTheme=github, userCssFile=null, verbose=true, disableInlineAssets=false
debug: Found 54 markdown files and 54 links pointing to them in TOC
Unhandled rejection Error: Unknown language: "text"
Please report this to https://github.com/markedjs/marked.
at Object.highlight (/usr/local/lib/node_modules/github-wikito-converter/node_modules/highlight.js/lib/highlight.js:443:13)
at Renderer.mainRenderer.code (/usr/local/lib/node_modules/github-wikito-converter/dist/markdown.js:34:79)
at Parser.tok (/usr/local/lib/node_modules/github-wikito-converter/node_modules/marked/lib/marked.js:1054:28)
at Parser.parse (/usr/local/lib/node_modules/github-wikito-converter/node_modules/marked/lib/marked.js:999:17)
at Function.Parser.parse (/usr/local/lib/node_modules/github-wikito-converter/node_modules/marked/lib/marked.js:981:17)
at marked (/usr/local/lib/node_modules/github-wikito-converter/node_modules/marked/lib/marked.js:1317:19)
at Markdown.convertMarkdownString (/usr/local/lib/node_modules/github-wikito-converter/dist/markdown.js:109:14)
at Markdown.convertMarkdownFile (/usr/local/lib/node_modules/github-wikito-converter/dist/markdown.js:116:19)
at WikiConverter.<anonymous> (/usr/local/lib/node_modules/github-wikito-converter/dist/wiki-converter.js:87:41)
at Array.forEach (native)
at WikiConverter.computePages (/usr/local/lib/node_modules/github-wikito-converter/dist/wiki-converter.js:83:27)
at WikiConverter.getPages (/usr/local/lib/node_modules/github-wikito-converter/dist/wiki-converter.js:96:14)
at HtmlWriter.write (/usr/local/lib/node_modules/github-wikito-converter/dist/html-writer.js:33:34)
at WikiConverter.<anonymous> (/usr/local/lib/node_modules/github-wikito-converter/dist/wiki-converter.js:60:43)
at tryCatcher (/usr/local/lib/node_modules/github-wikito-converter/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/github-wikito-converter/node_modules/bluebird/js/main/promise.js:510:31)
this is the sample public wiki I've cloned from gitlab:
git clone [email protected]:mbunkus/mkvtoolnix.wiki.git
Any theories on why I'm getting that error?
npm build
gives me an error Error: Cannot find module 'babel-core'
:
> [email protected] build
> rm -rf dist/* && ./node_modules/.bin/babel src --out-dir dist --source-maps
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'babel-core'
Require stack:
- /home/felics/.cache/yay/github-wikito-converter-git/src/github-wikito-converter/node_modules/babel/lib/babel/index.js
- /home/felics/.cache/yay/github-wikito-converter-git/src/github-wikito-converter/node_modules/babel/bin/babel.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/felics/.cache/yay/github-wikito-converter-git/src/github-wikito-converter/node_modules/babel/lib/babel/index.js:4:1)
at Module._compile (node:internal/modules/cjs/loader:1097:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1151:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:999:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/felics/.cache/yay/github-wikito-converter-git/src/github-wikito-converter/node_modules/babel/lib/babel/index.js',
'/home/felics/.cache/yay/github-wikito-converter-git/src/github-wikito-converter/node_modules/babel/bin/babel.js'
]
}
Node.js v17.6.0
I have no idea how npm
works, but a npm install babel-core
did not solve this.
Hi,
first of all I want to thank you for your work - I tried many converters to generate one PDF out of the different md-files from my GitHub Pages, but no one ever really worked well for me.
There's only one (already known and mentioned) big issue: relative links just don't work.
E.g.: links from the TOC to subchapters, links within the document and -even though it's not a subchapter- also the links back to the TOC from a page within the document don't work.
The relative links within the GitHub Pages are defined like this:
[chapter1](chapter1.md)
-> this works well within the PDF/html (just not back to TOC, which is also a 'main chapter' though: "toc.md")[subchapter_a1](chapter1.md#subchapter_a1)
-> this doesn't work at allIt would be really really great if you could find a solution for that! :)
Thanks!
If I have a .md file with a special character like "ç" or "ã" on my wiki,the result pdf simply skips it and the html creates an invalid link.
I installed github-wikito-converter
from npm
, but when I try to render a PDF file, the resulting output is an empty file.
Below are the steps I took:
sudo apt install wkhtmltopdf
sudo npm install -g github-wikito-converter
git clone https://github.com/yakivmospan/github-wikito-converter.wiki.git
gwtc -v -f pdf github-wikito-converter.wiki/
Output of last step:
debug: gwc launched with options format=pdf, output=./, filename=documentation, title=Documentation , logoImage=null, footer=null, pdfPageCount=null, tocFile=null, tocLevel=3, highlightTheme=github, userCssFile=null, verbose=true, disableInlineAssets=false
debug: Found 1 markdown files and 1 links pointing to them in TOC
debug: Generating pdf: 1 pages to generate
I get no errors or warnings other than quoted above. As I mentioned, the output is a plain empty file called documentation.pdf
. Generating an HTML file seems to work just fine. I'm on Linux Mint 19.
As described in this topic : https://medium.com/@goplaniaakash14/yakiv-mospan-thanks-for-response-f41ed8e07dfc
As mentioned in #17, code highlighter
used in gwtc
is not able to parse ``` text
in md files. This may be fixed in future highlighter
releases. Or we can replace each of ``` text
to ```
before render starts.
I'm trying to export a GitLab Wiki as PDF. SVG Files are not displayed, but PNGs are visible.
SVG import in MD:
![icon_development.svg](uploads/e9d06d849ee73e3f161ebc76051cecb5/icon_development.svg)
PNG import in MD:
![design_history](uploads/20ffeff92d68f74ef42b5c4a7aba74c2/design_history.png)
GitLab saves uploads in the upload
folder and I have confirmed that the files exist.
Is there any way to include the SVGs or do we need to convert them to PNG files?
See: markedjs/marked#1289
Hello, thanks for such a project, we are numerous to have this kind of request.
After installing the software and myproject.wiki repo as documented, I started gwtc (under Cmder within Laragon, on a Win7 PC), but obtained this error:
λ gwtc .\myproject.wiki
Unhandled rejection Error: The file C:\uploads\1e10ef3cce827f82ab1bdb3b5e67ab31\image.png was not found!
Please report this to https://github.com/chjj/marked.
at DataURI.encodeSync (d:\Users\MyUsername\AppData\Roaming\npm\node_modules\github-wikito-converter\node_modules\datauri\api.js:102:11)
at new DataURI (d:\Users\MyUsername\AppData\Roaming\npm\node_modules\github-wikito-converter\node_modules\datauri\module.js:24:34)
at sync (d:\Users\MyUsername\AppData\Roaming\npm\node_modules\github-wikito-converter\node_modules\datauri\module.js:37:16)
at Renderer.mainRenderer.image (d:\Users\MyUsername\AppData\Roaming\npm\node_modules\github-wikito-converter\dist\markdown.js:48:50)
at InlineLexer.outputLink (d:\Users\MyUsername\AppData\Roaming\npm\node_modules\github-wikito-converter\node_modules\marked\lib\marked.js:735:21)
at InlineLexer.output (d:\Users\MyUsername\AppData\Roaming\npm\node_modules\github-wikito-converter\node_modules\marked\lib\marked.js:650:19)
at Parser.tok (d:\Users\MyUsername\AppData\Roaming\npm\node_modules\github-wikito-converter\node_modules\marked\lib\marked.js:1137:50)
at Parser.parse (d:\Users\MyUsername\AppData\Roaming\npm\node_modules\github-wikito-converter\node_modules\marked\lib\marked.js:999:17)
at Function.Parser.parse (d:\Users\MyUsername\AppData\Roaming\npm\node_modules\github-wikito-converter\node_modules\marked\lib\marked.js:981:17)
at marked (d:\Users\MyUsername\AppData\Roaming\npm\node_modules\github-wikito-converter\node_modules\marked\lib\marked.js:1317:19)
at Markdown.convertMarkdownString (d:\Users\MyUsername\AppData\Roaming\npm\node_modules\github-wikito-converter\dist\markdown.js:109:14)
at Markdown.convertMarkdownFile (d:\Users\MyUsername\AppData\Roaming\npm\node_modules\github-wikito-converter\dist\markdown.js:116:19)
at WikiConverter.<anonymous> (d:\Users\MyUsername\AppData\Roaming\npm\node_modules\github-wikito-converter\dist\wiki-converter.js:87:41)
at Array.forEach (native)
at WikiConverter.computePages (d:\Users\MyUsername\AppData\Roaming\npm\node_modules\github-wikito-converter\dist\wiki-converter.js:83:27)
at WikiConverter.getPages (d:\Users\MyUsername\AppData\Roaming\npm\node_modules\github-wikito-converter\dist\wiki-converter.js:96:14)
I don't have C:\uploads directory, and at marked repo couldn't find where to find a clue.
Hello
There is incorrect management of relative links to images.
Let us imagine the situation:
/wiki_root
/images/img.png
/content/parameters.md
Under my wiki_root
folder, I've a sub-folder with my images.
In my /content/parameters.md
file, I put the following code ![](./../images/img.png)
. To get the image, I need to go one folder up to retrieve the images
folder..
Below a preview from within vscode: the first image is displayed; it's normal, the path is correct.
On the other hand, the second image isn't displayed, normal tool, the path is incorrect.
But, the convert tool didn't understand. He can find the ... second image because seems to calculate paths based on the root folder of the wiki. This is wrong. The path is relative to the markdown document; not from the root of the repository.
Is it possible to solve this please ?
Thanks.
Below the result of the conversion when I remove the first (and yet correct) link:
The second image is displayed and it shouldn't be the case since the path is wrong.
Thanks a lot!
I'm not sure if this is intentional.
Not all pages in the wiki are converted to PDF, only pages that are linked in the sidebar.
I just downloaded this and a single HTML file was generated. The links on the page redirect me to pages that do not exist and it just says "your file was not found"
As the title suggests - if the generated TOC is too long it flows past the end of the screen with no way to access the items farther down. I imagine it just needs an overflow-y: scroll
somewhere, but this level of HTML is well beyond me.
Cheers.
Example: https://www.dropbox.com/s/yh4ekbz2ul7pk20/Lokasenna_GUI%202.9%20Documentation.html?dl=0
Hi,
I've a problem.
All the *.md
files that contain a [ or ] character are ignored by the gwtc
command.
Every page in my github-wiki starts with a prefix, contained between two square brackets, that identifies the category of the page. For example:
[Guide] How to bla bla
When I execute the command gwtc -v ./repository.wiki
I obtain the following messages:
PS D:\Repositories> gwtc -v .\repository.wiki\
debug: gwc launched with options format=html, output=./, filename=documentation, title=Documentation , logoImage=null, footer=null, pdfPageCount=null, tocFile=repository.wiki\_Sidebar.md, tocLevel=3, highlightTheme=github, userCssFile=null, verbose=true, disableInlineAssets=false
debug: Found 42 markdown files and 42 links pointing to them in TOC
debug: Generating html: 0 pages to generate
info: html file written: documentation.html
documentation.html
It seems that the TOC file (in this case the _Sidebar.md
) is correctly parsed and the pages are detected, but the corresponding HTML is not generated inside the documentation.html
file.
Can you fix this issue?
Thank you
Problem: Generate PDF file has 0 size and thus no content
OS: Ubuntu 18.04.3 LTS
wkhtmltopdf: 0.12.4
gwtc: 1.5.2
mcajkovs@ubuntu:~/wiki$ git clone http://github.com/JustArchiNET/ArchiSteamFarm.wiki.git
mcajkovs@ubuntu:~/wiki$ gwtc -v -f all ./ArchiSteamFarm.wiki
debug: gwc launched with options format=all, output=./, filename=documentation, title=Documentation , logoImage=null, footer=null, pdfPageCount=null, tocTitle=Table of contents, tocFile=ArchiSteamFarm.wiki/_Sidebar.md, tocLevel=3, highlightTheme=github, userCssFile=null, verbose=true, disableInlineAssets=false
debug: Found 837 markdown files and 837 links pointing to them in TOC
debug: Generating html: 33 pages to generate
debug: Generating pdf: 33 pages to generate
mcajkovs@ubuntu:~/wiki$ ls -la
total 896
drwxrwxr-x 4 mcajkovs mcajkovs 4096 Apr 21 15:34 .
drwxr-xr-x 16 mcajkovs mcajkovs 4096 Apr 21 13:13 ..
drwxrwxr-x 4 mcajkovs mcajkovs 4096 Apr 21 15:27 ArchiSteamFarm.wiki
-rw-rw-r-- 1 mcajkovs mcajkovs 829029 Apr 21 15:46 documentation.html
-rw-r--r-- 1 mcajkovs mcajkovs 0 Apr 21 15:46 documentation.pdf
Apparently, only wiki pages with English titles are supported, pages with Russian titles are ignored and are not added to the final document
Also Russian names for title page and for table of contents are not read properly
Hello,
my wiki is written in german, so I would like to change the label of "Tabel of Content" to the german wording. So can be this added as comman-line flag to modify the TOC label?
Thanks
Is it possible to support page numbers in TOC?
In GitHub, when writing links between pages, you can omit the wiki link if the page name is the same.
For example:
[[Architecture Overview|Architecture-Overview]]
is the same as
[[Architecture Overview]]
However, gwtc
recognizes the second format as a file relative link instead of link within the wiki.
I have a page called: https://github.com/check-spelling/check-spelling/wiki/@actions-upload-artifact
Using this tool, the @
entry links to the raw file instead of the unified documentation file:
Problem: Unable to generate a PDF file.
OS: Windows 7
gwtc: 1.5.1
wkhtmltopdf: 0.12.5
Note: I installed gwtc using npm.
Here's the command I used to get the versions:
gwtc -V
1.5.1
I additionally installed version 0.12.5 of wkhtmltox.
wkhtmltopdf.exe -V
wkhtmltopdf 0.12.5 (with patched qt)
Here's the command I'm using to generate the pdf:
gwtc -v -o test -f pdf hardware-camera.wiki
Here's the output of that command:
debug: gwc launched with options format=pdf, output=test, filename=documentation, title=Documentation , logoImage=null, footer=null, pdfPageCount=null, tocFile=null, tocLevel=3, highlightTheme=github, userCssFile=null, verbose=true, disableInlineAssets=false
debug: Found 42 markdown files and 42 links pointing to them in TOC
debug: Generating pdf: 42 pages to generate
Nothing appears in my "test" directory. However when I run the following command I get a file named documentation.html as expected.
Let me know if I'm doing something wrong or if there's anything else I should try.
gwtc -v -o test -f html hardware-camera.wiki
Got this wiki cloned on wiki.wiki folder:
https://github.com/ethereum/wiki.wiki.git
Tried
$ gwtc wiki.wiki
Crashes with
Unhandled rejection Error: Unknown language: "solidity"
Please report this to https://github.com/markedjs/marked.
at Object.highlight (/usr/local/lib/node_modules/github-wikito-converter/node_modules/highlight.js/lib/highlight.js:494:13)
at Renderer.mainRenderer.code (/usr/local/lib/node_modules/github-wikito-converter/dist/markdown.js:34:79)
at Parser.tok (/usr/local/lib/node_modules/github-wikito-converter/node_modules/marked/lib/marked.js:1058:28)
at Parser.parse (/usr/local/lib/node_modules/github-wikito-converter/node_modules/marked/lib/marked.js:1003:17)
at Function.Parser.parse (/usr/local/lib/node_modules/github-wikito-converter/node_modules/marked/lib/marked.js:985:17)
at marked (/usr/local/lib/node_modules/github-wikito-converter/node_modules/marked/lib/marked.js:1322:19)
at Markdown.convertMarkdownString (/usr/local/lib/node_modules/github-wikito-converter/dist/markdown.js:109:14)
at Markdown.convertMarkdownFile (/usr/local/lib/node_modules/github-wikito-converter/dist/markdown.js:116:19)
at WikiConverter. (/usr/local/lib/node_modules/github-wikito-converter/dist/wiki-converter.js:87:41)
at Array.forEach ()
at WikiConverter.computePages (/usr/local/lib/node_modules/github-wikito-converter/dist/wiki-converter.js:83:27)
at WikiConverter.getPages (/usr/local/lib/node_modules/github-wikito-converter/dist/wiki-converter.js:96:14)
at HtmlWriter.write (/usr/local/lib/node_modules/github-wikito-converter/dist/html-writer.js:33:34)
at WikiConverter. (/usr/local/lib/node_modules/github-wikito-converter/dist/wiki-converter.js:60:43)
at tryCatcher (/usr/local/lib/node_modules/github-wikito-converter/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/github-wikito-converter/node_modules/bluebird/js/main/promise.js:510:31)
$ yarn add github-wikito-converter
$ ./node_modules/.bin/gwtc -d .
(node:44111) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
Unhandled rejection Error: ENOENT: no such file or directory, stat '/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/github-wikito-converter/node_modules/jquery/dist/jquery.min.js'
at Object.statSync (node:fs:1141:3)
at Object.statSync (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/graceful-fs/polyfills.js:312:16)
at Object.copySync (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/fs-extra/lib/copy-sync/copy-sync.js:20:58)
at WikiConverter.<anonymous> (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/github-wikito-converter/dist/wiki-converter.js:166:12)
at Array.forEach (<anonymous>)
at WikiConverter.copyAssets (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/github-wikito-converter/dist/wiki-converter.js:165:19)
at WikiConverter.<anonymous> (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/github-wikito-converter/dist/wiki-converter.js:54:16)
at tryCatcher (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/bluebird/js/main/promise.js:510:31)
at Promise._settlePromiseAt (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/bluebird/js/main/promise.js:584:18)
at Promise._settlePromises (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/bluebird/js/main/promise.js:700:14)
at Async._drainQueue (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/jsoref/code/spelling-org/check-spelling.wiki/node_modules/bluebird/js/main/async.js:15:14)
at processImmediate (node:internal/timers:464:21)
--- node_modules/github-wikito-converter/dist/wiki-converter.js 2021-05-02 12:37:52.000000000 -0400
+++ node_modules.0/github-wikito-converter/dist/wiki-converter.js 2021-05-02 12:41:42.000000000 -0400
@@ -135,7 +135,7 @@
key: "computeCssFiles",
value: function computeCssFiles() {
- this.cssFiles = [path.join(__dirname, '..', 'node_modules', 'bootstrap', 'dist', 'css', 'bootstrap.min.css'), path.join(__dirname, '..', 'node_modules', 'highlight.js', 'styles', 'default.css'), path.join(__dirname, '..', 'node_modules', 'highlight.js', 'styles', this.options.highlightTheme + '.css'), path.join(this.cssPath, 'doc.css')];
+ this.cssFiles = [path.join(__dirname, '..', '..', '..', 'node_modules', 'bootstrap', 'dist', 'css', 'bootstrap.min.css'), path.join(__dirname, '..', '..', '..', 'node_modules', 'highlight.js', 'styles', 'default.css'), path.join(__dirname, '..', '..', '..', 'node_modules', 'highlight.js', 'styles', this.options.highlightTheme + '.css'), path.join(this.cssPath, 'doc.css')];
this.options.userCssFile && this.cssFiles.push(path.resolve(this.options.userCssFile));
return this;
@@ -149,7 +149,7 @@
key: "computeJsFiles",
value: function computeJsFiles() {
- this.jsFiles = [path.join(__dirname, '..', 'node_modules', 'jquery', 'dist', 'jquery.min.js'), path.join(__dirname, '..', 'node_modules', 'bootstrap', 'dist', 'js', 'bootstrap.min.js')];
+ this.jsFiles = [path.join(__dirname, '..', '..', '..', 'node_modules', 'jquery', 'dist', 'jquery.min.js'), path.join(__dirname, '..', '..', '..', 'node_modules', 'bootstrap', 'dist', 'js', 'bootstrap.min.js')];
this.options.userJsFile && this.jsFiles.push(path.resolve(this.options.userJsFile));
return this;
Hi,
Can I insert data into the <head>
section of the html file? I'd like to add Google analytics ID, meta tags and other SEO related things.
Thank you in advance!
Unable to convert Google Guava wiki at https://github.com/google/guava/wiki
$ gwtc ./guava.wiki
Unhandled rejection Error: Unknown language: "buildr"
Please report this to https://github.com/markedjs/marked.
at Object.highlight (/usr/lib/node_modules/github-wikito-converter/node_modules/highlight.js/lib/highlight.js:506:13)
at Renderer.mainRenderer.code (/usr/lib/node_modules/github-wikito-converter/dist/markdown.js:34:79)
at Parser.tok (/usr/lib/node_modules/github-wikito-converter/node_modules/marked/lib/marked.js:1058:28)
at Parser.parse (/usr/lib/node_modules/github-wikito-converter/node_modules/marked/lib/marked.js:1003:17)
at Function.Parser.parse (/usr/lib/node_modules/github-wikito-converter/node_modules/marked/lib/marked.js:985:17)
at marked (/usr/lib/node_modules/github-wikito-converter/node_modules/marked/lib/marked.js:1322:19)
at Markdown.convertMarkdownString (/usr/lib/node_modules/github-wikito-converter/dist/markdown.js:109:14)
at Markdown.convertMarkdownFile (/usr/lib/node_modules/github-wikito-converter/dist/markdown.js:116:19)
at WikiConverter.<anonymous> (/usr/lib/node_modules/github-wikito-converter/dist/wiki-converter.js:87:41)
at Array.forEach (<anonymous>)
at WikiConverter.computePages (/usr/lib/node_modules/github-wikito-converter/dist/wiki-converter.js:83:27)
at WikiConverter.getPages (/usr/lib/node_modules/github-wikito-converter/dist/wiki-converter.js:96:14)
at HtmlWriter.write (/usr/lib/node_modules/github-wikito-converter/dist/html-writer.js:33:34)
at WikiConverter.<anonymous> (/usr/lib/node_modules/github-wikito-converter/dist/wiki-converter.js:60:43)
at tryCatcher (/usr/lib/node_modules/github-wikito-converter/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (/usr/lib/node_modules/github-wikito-converter/node_modules/bluebird/js/main/promise.js:510:31)
I would expect that a new TOC item (h1) would start on a new page in the pdf. How to enforce that?
Thanks
If two Wiki pages have the same heading title (e.g., "Next Steps"), the generated anchor link will be incorrect. In general, I suggest changing any anchor references in Wiki pages (e.g. #next-steps
) to a "fully qualified version that includes the page name (i.e.,, #page-1-next-steps
).
For now, the workaround to avoid duplicate heading names.
As MarikaGrzebieniowska mention, GitHub's[[assets/image.png]]
shortcut style is not working, while ![](assets/image.png)
is doing well.
I just found a bug in this package with anchors.
Let's say I have two md files in my wiki that I want to convert to html.
File1.md
# Title 1 of file 1
... content 1 ...
# Title 2 of file 1
... content 2 ...
GitHub automatically sets up anchors for the titles that I can reference in other wiki files to have a direct link.
File2.md
Here I can put a [Reference](File1#title-1-of-file-1) linked to title2 of file 1.
The thing is that when generating the html, because there is only one html page, this doesn't work. The reference put in the link in the html in my example is #File1title-1-of-file-1 instead of the expected #title-1-of-file-1
I've tried with different wiki repo and there are some links inside the sidebar that are not rendered in the html
file.
For example this is the VScode wiki
git clone https://github.com/microsoft/vscode.wiki.git
Then I used the code:
gwtc ./vscode.wiki
And the final html
has the Extension-API-Guidelines
files with corrupted link. Inside the _sidebar.md
file I noticed that the link[[]]
is written in capital letters instead it is lowercase in the folder.
gwtc ./nwchem.wiki
Version 9 of Highlight.js has reached EOL and is no longer supported.
Please upgrade or ask whatever dependency you are using to upgrade.
highlightjs/highlight.js#2877
documentation.html
I've tried npm install highlight.js and it says, that 10.5 version is installed. GWTC, obviously, use its own highlight.js
wanted to report another incidence of problem related to #39, but managed to resolve the problem - see: #39 (comment)
sorry for the non-relevant issue and feel free to delete it. Alternatively, you can also use the above instructions to provide a docker image Dockerfile for your tool :-)
Put Home.md on top.
In both output modes, page headers and links are named identically to the .md files cloned from the wiki (spaces are replaced with dashes and .md is appended) unlike in the the sample PDF.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.