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

Add Comments to a Static Site with Netlify Functions and the GitHub API #117

Open
AleksandrHovhannisyan opened this issue Oct 20, 2021 · 7 comments
Labels
comments Comments section for an article.

Comments

@AleksandrHovhannisyan
Copy link
Owner

No description provided.

@AleksandrHovhannisyan AleksandrHovhannisyan added the comments Comments section for an article. label Oct 20, 2021
@AustenLamacraft
Copy link

Thanks for this great tutorial! I'm just beginning to work through it. One typo I just came across is that in Testing Netlify Functions Locally the flag should be --querystring not --queryString i.e. no camel case.

@AleksandrHovhannisyan
Copy link
Owner Author

@AustenLamacraft Thanks for letting me know! Fixed.

@muratcorlu
Copy link

Is there a reason not to use GitHub issues (first entry) also as the source of the article itself? I see some good benefits of doing that:

  • Issue will be more consumable since the article will be on top
  • Writing articles even would be easier compared to pushing a markdown file (especially while being mobile)
  • We have issue labels to use as tags
  • Only issues that has post label can be published. So other type of issues will not published as blog post
  • This way a single blog can have multiple authors easily. Just add post label to an issue from someone else and it'll be published as blog post. And we have author information already with the API.
  • There are many good trigger events for GitHub actions. With a good incremental build, every new issue can build blog very quickly.

Some potential issues that I see:

  • Embedded images. Normally github hosts images that you pasted to an issue. That can be even easier if you prefer. Otherwise you need to manually put images somewhere.
  • Using template shortcuts could be a problem. Need to try.
  • Putting some extra type of frontier data would be an issue.

I want to give it a try but wanted to mention here first to get early insights about this idea.

@AleksandrHovhannisyan
Copy link
Owner Author

@muratcorlu It's certainly an interesting idea. One reason I might not do this is because it ties you down to that one repo, whereas imo your articles should be independent media that you can transfer between different CMSes/source control platforms as needed. Another reason is that authoring posts in GitHub issues limits your ability to add custom styling, JavaScript, semantics, and other design elements. For example, you can't use shortcodes (e.g., 11ty) or MDX (Next/Gatsby).

If it works for you, though, go for it!

@Ahart4u2
Copy link

Enjoyed the information in the article. Also the article on Twitter was so true. It will take over and you have to take a break from all social media.

Thank you

@JeffML
Copy link

JeffML commented Oct 24, 2022

One more typo:

const { data: rateLimitInfo } = await Octokit.rateLimit.get();

Should read: const { data: rateLimitInfo } = await octokitClient.rateLimit.get();

@AleksandrHovhannisyan
Copy link
Owner Author

Oops 😅 Thanks! @JeffML

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

No branches or pull requests

5 participants