yakivmospan / github-wikito-converter

Generate HTML & PDF documentation from Github wiki or any other markdown-based wiki.
Other
296 stars 52 forks source link

Resolve link issues #68

Open amc1999 opened 3 years ago

amc1999 commented 3 years ago
  1. Resolve link issues:
    • section links issue yakivmospan/github-wikito-converter#45 yakivmospan/github-wikito-converter#42
    • ".md" title and TOC yakivmospan/github-wikito-converter#56
    • non-ascii file name issue yakivmospan/github-wikito-converter#51 yakivmospan/github-wikito-converter#41 yakivmospan/github-wikito-converter#37 yakivmospan/github-wikito-converter#54
    • link to section inside of the page itself issue yakivmospan/github-wikito-converter#53

Please keep in mind, some issues above I have not tested, it may be there are more work needs to be done. I've tested my own wiki with some extra unicode file names and it does work as expected.

  1. Add extra option to disable highlightAuto() code blocks:
    gwtc --disable-highlight-auto ....

    Current highlightAuto() applied by default to code blocks and it may produce unexpected results. For example some trivial 4 front spaces console output:

    2021-05-11 16:23:56 Start
    2021-05-11 16:23:56 Finish

    may be displayed with unexpected rainbow color coding. That forces excessive use of plaintext and break compatibility with GitHub and GitLab. Extra --disable-highlight-auto option fix that problem.

Last, but not least: BIG thank you for github-wikito-converter

hangingman commented 3 years ago

@amc1999 I tried to install this repository with this branch by build-and-install-g, however it requires babel. It's better to add babel-cli as devDependencies .

$ npm run build-and-install-g

> github-wikito-converter@1.5.3 build-and-install-g
> npm run build && npm install -g

> github-wikito-converter@1.5.3 build
> ./node_modules/.bin/babel src --out-dir dist --source-maps

sh: ./node_modules/.bin/babel: No such file or directory

However, it works well. Thank you !

hangingman commented 3 years ago

@yakivmospan @mchoraine Would you please merge this PR ?

amc1999 commented 3 years ago

Thank you, @hangingman

That problem quite old and coming from original limedocs/limedocs-wiki-converter sources. Missing step is to do npm install.

So, actual instructions to build and run locally:

git clone https://github.com/yakivmospan/github-wikito-converter.git
cd github-wikito-converter
npm install

npm run build-and-install-g

I've tested it on two wiki's:

cd ..
git clone https://github.com/yakivmospan/github-wikito-converter.wiki.git
gwtc ./github-wikito-converter.wiki

git clone https://github.com/openmpp/openmpp.github.io.wiki.git
gwtc ./openmpp.github.io.wiki

it works :)

I may do another PR to update readme.

yakivmospan commented 2 years ago

Hey @hangingman, it's a shame but I somehow missed this PR earlier. Will take a look at it asap. Thanks for your contribution!