github-wikito-converter icon indicating copy to clipboard operation
github-wikito-converter copied to clipboard

Resolve link issues

Open amc1999 opened this issue 3 years ago • 4 comments

  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

amc1999 avatar May 11 '21 20:05 amc1999

@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

> [email protected] build-and-install-g
> npm run build && npm install -g

> [email protected] 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 avatar Oct 29 '21 02:10 hangingman

@yakivmospan @mchoraine Would you please merge this PR ?

hangingman avatar Oct 29 '21 02:10 hangingman

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.

amc1999 avatar Oct 29 '21 04:10 amc1999

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

yakivmospan avatar Jan 25 '22 07:01 yakivmospan