Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some questions about gitmint. #1

Closed
ivan-nginx opened this issue Jul 25, 2017 · 1 comment
Closed

Some questions about gitmint. #1

ivan-nginx opened this issue Jul 25, 2017 · 1 comment

Comments

@ivan-nginx
Copy link

ivan-nginx commented Jul 25, 2017

Hi! First of all, thank's for gateway and force HTTPS features, it's really good.

And there are some questions:

  1. How i can add other languages to new translate feature? Just add export function language(Text) in translator.js, right?
  2. Can u give some short instructions about use proxy_gateway? I want use that line in code: http.post('/login/oauth/access_token' intead of imsun gateway.
  3. Can u rename Powered by on your link and add option on show/hide it or any another variant to hide it?

P.S. I want to integrate Gitmint into Hexo theme NexT, peoples ask for it.

@aimingoo
Copy link
Owner

aimingoo commented Jul 25, 2017

Thanks for your attention.

  1. Yes. add export function ..., and use it in your theme, ex: https://github.com/aimingoo/gitmint#language-translator

  2. The API called in Gitmint at here . so, i'll replace imsun's gateway when you send proxy_gateway in options. ex: https://github.com/aimingoo/gitmint#proxy_gateway-support

  3. I cant. because the original project's owner is imsun, please submit this request to @imsun. but if you wanna hide it only, you can add a extend theme and a footerHidden option, ex:

// https://github.com/imsun/gitment#3-render-gitment
...
const gitment = new Gitment({
  ...
  footerHidden: true,
  theme: {
    renderFooter: function(state, instance) {
      return (! instance.footerHidden) ? instance.defaultTheme['renderFooter'](state, instance)
        : Object.assign(document.createElement('div’), { className: 'gitment-hidden' })
    }
  }
})

gitment.render('comments')

please affirm that from @imsun at https://github.com/imsun/gitment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants