wordpress-markdown-git icon indicating copy to clipboard operation
wordpress-markdown-git copied to clipboard

Gitlab local API

Open Dimitri281 opened this issue 4 years ago • 3 comments

Versions Wordpress: 5.7.2 Documents for Git: 1.1.1

Hello i have one specific case to show you,

we are in closed environement , we working only with local resource, i see in class-base-loader.php the line for initiate the github api :

private static $GITHUB_MARKDOWN_API = 'https://api.github.com/markdown';

do u think it's verry hard to change for use a gitlab api V4 locally (https://my_own_gitlab.lan/api/v4/markdown) ?

TIA.

Dimitri

Dimitri281 avatar May 19 '21 17:05 Dimitri281

Ah nice, I missed that Gitlab introduced its own markdown API recently! So thanks @Dimitri281!

It's not very hard but quite a bit of shuffling code around. In that case I'd like to make the whole markdown endpoint user-configurable in the settings.json. What do you think about that?

Maybe there are even other renderers I don't know about and honestly, Github's API is a little painful with anchor references (always need to prefix with user-content- :roll_eyes: ).

That being said, I see 2 options:

  1. You give it a shot yourself and I can review the PR
  2. You contact us on enquiry[at]gis-ops.com and we can send you an offer to implement the functionality

nilsnolde avatar May 19 '21 18:05 nilsnolde

ah well, maybe gitlab's markdown api is not that recent, was merged 3 years ago :sweat_smile:

nilsnolde avatar May 19 '21 18:05 nilsnolde

😅 It is true that our use case is slightly specific but in any case you have really done a great job, and thank you for your quick response, I think to tweak a little trick on a corner of the table to meet our need but if I will take care of it in the next few days. It is with pleasure that I will send it to you, if I do not have time to look into it I will ask my superiors if we can imagine making a commercial request on this subject. . i wish u a good day and looking forward to conversing again.

Dimitri281 avatar May 19 '21 18:05 Dimitri281