cusdis icon indicating copy to clipboard operation
cusdis copied to clipboard

Documentation for integration

Open djyde opened this issue 3 years ago • 43 comments

Or if you want to know how does Cusdis intergrate with other services, just leave a comment.

djyde avatar Apr 21 '21 12:04 djyde

这怎么配合这个项目使用?https://github.com/transitive-bullshit/nextjs-notion-starter-kit

yizhen666 avatar Apr 21 '21 13:04 yizhen666

@wz1616 Hi! I will have a look at notion-starter-kit and write an integrate document for it.

djyde avatar Apr 21 '21 13:04 djyde

Thank You Very Much! Waiting For It!

yizhen666 avatar Apr 21 '21 13:04 yizhen666

I integrated it on my Jekyll blog.

PR to upstream theme with the modifications needed.

My Blog

danisztls avatar Apr 21 '21 13:04 danisztls

@lbcnz Awesome!

I read the PR, you properly miss a double quote. I've commented in the PR review.

And in your blog post, the app-id is missing too. Is it because the missing double quote?

djyde avatar Apr 21 '21 14:04 djyde

@wz1616 Hi! I will have a look at notion-starter-kit and write an integrate document for it.

Have you finished it, please?

yizhen666 avatar Apr 21 '21 14:04 yizhen666

@lbcnz Awesome!

I read the PR, you properly miss a double quote. I've commented in the PR review.

And in your blog post, the app-id is missing too. Is it because the missing double quote?

Due to sleepiness and lack of testing. I have fixed it.

The quotes are 'optional' as there is no whitespace in the strings but all the variable names were wrong. 😄

danisztls avatar Apr 21 '21 14:04 danisztls

@wz1616 I've finished the document of JS SDK, if you understand how it works, you may know how to integrate it in notion-starter-kit by yourself.

https://cusdis.com/doc#/advanced/sdk

Anyway I will check this later.

djyde avatar Apr 21 '21 15:04 djyde

Would love to see MkDocs with mkdocs-material and Docusaurus added to the list!

eric-hc avatar Apr 21 '21 20:04 eric-hc

I'm working to integrate it into Next JS with SSG, the comments keep fixed when I navigate between screens, if i refresh everything is ok. Would love to see and example of it. Anyway I'm going to keep trying to handle the issue.

pablopvsky avatar Apr 22 '21 02:04 pablopvsky

@eric-hc Sure! I don't use python so I'd like to leave MkDocs to the community. But I would try to integrate with Docusaurus.

(Feel free to contribute if someone can do the MkDocs integration. ❤️)

djyde avatar Apr 22 '21 03:04 djyde

@pablopvsky Thank you! I think the Docsify plugin implementation would help you

https://github.com/djyde/cusdis/blob/master/public/js/cusdis.docsify.js#L33

I expose a renderCusdis method on window so that the SPA can call it to rerender the widget (Sorry I didn't mention it on the JS SDK document):

https://github.com/djyde/cusdis/blob/master/widget/index.js#L15

djyde avatar Apr 22 '21 03:04 djyde

现在问题是我不知道该把代码放到哪个文件,还得麻烦您看看> @wz1616 I've finished the document of JS SDK, if you understand how it works, you may know how to integrate it in notion-starter-kit by yourself.

https://cusdis.com/doc#/advanced/sdk

Anyway I will check this later.

yizhen666 avatar Apr 22 '21 14:04 yizhen666

您好?请问进度如何了?> @wz1616 I've finished the document of JS SDK, if you understand how it works, you may know how to integrate it in notion-starter-kit by yourself.

https://cusdis.com/doc#/advanced/sdk

Anyway I will check this later.

yizhen666 avatar Apr 23 '21 12:04 yizhen666

@pablopvsky You can check about react-cusdis! https://github.com/Cusdis/sdk/tree/master/packages/react-cusdis

djyde avatar Apr 24 '21 08:04 djyde

@wz1616 I just create a PR to nextjs-notion-starter-kit.

If you want to integrate in your existed project, just follow what I did in File Changed https://github.com/transitive-bullshit/nextjs-notion-starter-kit/pull/102/files

djyde avatar Apr 24 '21 09:04 djyde

真的非常感谢您!辛苦了! Thank you very much! Thank you for your hard work!

@wz1616 I just create a PR to nextjs-notion-starter-kit.

If you want to integrate in your existed project, just follow what I did in File Changed https://github.com/transitive-bullshit/nextjs-notion-starter-kit/pull/102/files

yizhen666 avatar Apr 24 '21 11:04 yizhen666

Could you provide your repo?

wz1616 @.***>於 2021年4月24日 週六,下午8:32寫道:

I tried again.Here are logs [image: image] https://user-images.githubusercontent.com/62297116/115958924-21493a00-a53c-11eb-87ba-e1e7eff85660.jpeg> @wz1616 https://github.com/wz1616 I just create a PR to nextjs-notion-starter-kit.

If you want to integrate in your existed project, just follow what I did in File Changed https://github.com/transitive-bullshit/nextjs-notion-starter-kit/pull/102/files

You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/djyde/cusdis/issues/22#issuecomment-826086042, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG7HGPTOCB2ZOMZBYR74LDTKK257ANCNFSM43KJZT5A .

djyde avatar Apr 24 '21 13:04 djyde

Could you provide your repo?

wz1616 @.***>於 2021年4月24日 週六,下午8:32寫道:

I tried again.Here are logs [image: image] https://user-images.githubusercontent.com/62297116/115958924-21493a00-a53c-11eb-87ba-e1e7eff85660.jpeg> @wz1616 https://github.com/wz1616 I just create a PR to nextjs-notion-starter-kit.

If you want to integrate in your existed project, just follow what I did in File Changed https://github.com/transitive-bullshit/nextjs-notion-starter-kit/pull/102/files

You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/djyde/cusdis/issues/22#issuecomment-826086042, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG7HGPTOCB2ZOMZBYR74LDTKK257ANCNFSM43KJZT5A .

I encountered some problems before, and after checking, I found that it was a code formatting error. It's settled now. thank you.

yizhen666 avatar Apr 24 '21 13:04 yizhen666

@wz1616 Cool! If still have problem in nextjs-notion-starter-kit, you can create a new issue, instead of this issue 😇

djyde avatar Apr 24 '21 13:04 djyde

Thanks Again! How About This?https://github.com/djyde/cusdis/issues/49> @wz1616 Cool! If still have problem in nextjs-notion-starter-kit, you can create a new issue, instead of this issue 😇

yizhen666 avatar Apr 24 '21 13:04 yizhen666

@djyde It would be great if it can be integrated with Nextra Blog Theme.

Related nextra issue: https://github.com/shuding/nextra/issues/139

YikSanChan avatar Apr 25 '21 13:04 YikSanChan

@djyde It would be great if it can be integrated with Nextra Blog Theme.

Related nextra issue: shuding/nextra#139

https://github.com/shuding/nextra/pull/143 @YikSanChan

djyde avatar Apr 25 '21 16:04 djyde

I integrated Cusdis with my Hugo-generated static site, I configured the code with these parameters:

  data-page-id="{{ .Permalink }}"
  data-page-url="{{ .Permalink }}"
  data-page-title="{{ .Title }}"

It works fine, but I can't get any email for new comments... does it work for you?

scag1io avatar Apr 28 '21 18:04 scag1io

Hosted or self-host version?

scag1io @.***>於 2021年4月29日 週四,上午2:53寫道:

I integrated Cusdis with my Hugo-generated static site, I configured the code with these parameters:

data-page-id="{{ .Permalink }}" data-page-url="{{ .Permalink }}" data-page-title="{{ .Title }}"

It works fine, but I can't get any email for new comments... does it work for you?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/djyde/cusdis/issues/22#issuecomment-828699512, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG7HGLJEB2ZVRQJ4U7BKSDTLBKTLANCNFSM43KJZT5A .

djyde avatar Apr 29 '21 01:04 djyde

Hosted on Vercel, I cloned your repository yesterday. PostgreSQL DB is self-hosted reachable with DuckDNS.

scag1io avatar Apr 29 '21 07:04 scag1io

Hosted on Vercel, I cloned your repository yesterday. PostgreSQL DB is self-hosted reachable with DuckDNS.

You need to configure SMTP in self-host version. See https://cusdis.com/doc#/features/notification?id=self-host

djyde avatar Apr 29 '21 07:04 djyde

You need to configure SMTP in self-host version. See https://cusdis.com/doc#/features/notification?id=self-host

I already did it. You mean Vercel Environment Variables, right? I am trying with Gmail: SMTP_HOST set to "smtp.gmail.com" SMTP_USER set to "[email protected]" SMTP_PASSWORD set to an "App password" by Gmail SMTP_SENDER set to "[email protected]" I did not set SMTP_PORT and SMTP_SECURE.

The email is not sent when the comment is posted, I can see that the "App password" is not used. Obviously I redeployed the Vercel app.

What should be the correct syntax for HOST? "example.com"?

scag1io avatar Apr 29 '21 12:04 scag1io

You need to configure SMTP in self-host version. See https://cusdis.com/doc#/features/notification?id=self-host

I already did it. You mean Vercel Environment Variables, right? I am trying with Gmail: SMTP_HOST set to "smtp.gmail.com" SMTP_USER set to "[email protected]" SMTP_PASSWORD set to an "App password" by Gmail SMTP_SENDER set to "[email protected]" I did not set SMTP_PORT and SMTP_SECURE.

The email is not sent when the comment is posted, I can see that the "App password" is not used. Obviously I redeployed the Vercel app.

What should be the correct syntax for HOST? "example.com"?

This is because Gmail's security settings. See https://github.com/djyde/cusdis/issues/47#issuecomment-826563398

djyde avatar Apr 29 '21 16:04 djyde

This is because Gmail's security settings. See #47 (comment)

Nope, because I tested the credentials with another SMTP tester and it works. I'll do some more tests later.

scag1io avatar Apr 29 '21 17:04 scag1io