Zyzle / commenter

WebComponent comments system for my blog using Angular and Github issues

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Commenter

Commenter is a Web Components based comment system that allows you to use GitHub's issues as your comments backend.

This project works in conjunction with lynx.rs to authenticate with Github's oauth, or rather it will once comment and reaction submission is added.

This project was generated with Angular CLI version 13.3.3.

Usage

Commenter, when built consists of 3 js files; runtime, polyfills, and main. These three files simply need to be included as you would any other js files:

<head>
  <!-- ... --->
  <script src="/runtime.xxxxxxxxxxxxxxxx.js" type="module"></script>
  <script src="/polyfills.xxxxxxxxxxxxxxxx.js" type="module"></script>
  <script src="/main.xxxxxxxxxxxxxxxx.js" type="module"></script>
</head>

Once this is done add the custom zyzle-commenter tag to your body where you want comments to appear and give it the required attributes:

<body>
  <!-- ... -->
  <zyzle-commenter 
    gh-repo="zyzle.github.io"
    owner="Zyzle"
    issue-number="7"
    client-id="1234abcd"
    lynx-app="your.lynxApp-domain.com">
  </zyzle-commenter>
</body>

The required attributes are as follows:

Attribute Description
gh-repo The repository where the selected issue exists
owner The repository owner, either organisation name or github user
issue-number The repository issue number to pull comments from
client-id The Client ID of your Github OAuth app
lynx-app The domain of your Lynx.rs application (no need for https:// prefix)

You can find instructions for how to setup a Github OAuth app in their documentation

About

WebComponent comments system for my blog using Angular and Github issues

License:MIT License


Languages

Language:TypeScript 78.9%Language:HTML 10.4%Language:JavaScript 5.5%Language:SCSS 5.1%Language:Shell 0.2%