github-wiki-sidebar icon indicating copy to clipboard operation
github-wiki-sidebar copied to clipboard

Can't set `%3A-` or `: ` as seperator

Open Bluscream opened this issue 4 years ago • 3 comments

I tried setting %3A , %3A-, : and :- and neither of them worked:

this is the folder structure:

Bluscream avatar Oct 17 '19 17:10 Bluscream

Trying to set the config manually to

{
  "menu": {
    "item": "{{#levelRepeat}}  {{/levelRepeat}}* [{{{title}}}]({{{link}}})\n",
    "category": "{{#levelRepeat}}  {{/levelRepeat}}* {{#link}}[{{{title}}}]({{{link}}}){{/link}}{{^link}}{{{title}}}{{/link}}\n{{{subitems}}}",
    "category-1": "{{{subitems}}}\n"
  },
  "rules": {
    "exclude": [],
    "order": []
  },
  "separator": "%3A-",
  "linkTemplate": "./%s",
  "menuFile": "_Sidebar.md",
  "multilang": false,
  "menuOnly": true
}

makes the sidebar working, but the pages itself have the undecoded HTML in their title (eg. Tricks%3A Open URLs in myTube)

Bluscream avatar Oct 17 '19 17:10 Bluscream

I still have exactly the same problem, regardless if I try to choose the default (just hitting enter) or manually defining a category separator. I am always being prompted that "The following characters are allowed a-z#~ @_!".

tillik avatar Nov 26 '19 09:11 tillik

The - character is reserved by the Github Wiki Pages specification. It is used to denote a whitespace in the name of the page rather than the conventional %20 in HTML.

Therefore you cannot use :- as a separator. You use : as the separator. When you see :- that is read as : by the parser for both the sidebar generator and the github wiki.

jrkarnes avatar Jan 09 '24 15:01 jrkarnes