diff --git a/docs/_config.yml b/docs/_config.yml index 354b229c0..b9ef59542 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -98,20 +98,22 @@ sidebar: url: /configuration/ - title: Advanced Configuration url: /advanced-configuration/ + - title: Integrating + children: - title: Authentication - url: /authentication/ + url: /integrating/authentication/ - title: Configuring the Comment Stream - url: /configuring-comment-stream/ + url: /integrating/configuring-comment-stream/ - title: Configuring the Admin - url: /configuring-admin/ + url: /integrating/configuring-admin/ - title: Notifications - url: /notifications/ + url: /integrating/notifications/ - title: Event Tracking and Metrics - url: /event-tracking-metrics/ + url: /integrating/event-tracking-metrics/ - title: Styling and CSS - url: /styling-css/ + url: /integrating/styling-css/ - title: Translations and i18n - url: /translations-i18n/ + url: /integrating/translations-i18n/ - title: Product Guide children: - title: How Talk Works @@ -130,10 +132,8 @@ sidebar: children: - title: Plugins Overview url: /plugins/ - - title: Default Plugins - url: /default-plugins/ - - title: Additional Plugins - url: /additional-plugins/ + - title: Plugin Directory + url: /plugins-directory/ - title: Plugin Recipes url: /plugin-recipes/ - title: Reference diff --git a/docs/package.json b/docs/package.json index 7e595d89c..83b348a05 100644 --- a/docs/package.json +++ b/docs/package.json @@ -18,9 +18,10 @@ "hexo-generator-index": "^0.2.0", "hexo-renderer-marked": "^0.3.0", "hexo-renderer-sass": "^0.3.2", - "hexo-server": "^0.3.1" + "hexo-server": "^0.3.1", + "lunr": "^2.1.6" }, "devDependencies": { "nodemon": "^1.14.12" } -} \ No newline at end of file +} diff --git a/docs/source/02-02-advanced-configuration.md b/docs/source/02-02-advanced-configuration.md index 41264ff11..458efe8d7 100644 --- a/docs/source/02-02-advanced-configuration.md +++ b/docs/source/02-02-advanced-configuration.md @@ -56,50 +56,6 @@ When `TRUE`, it will not mount the static asset serving routes on the router. This is used primarily in conjunction with [TALK_STATIC_URI](#talk_static_uri) when the static assets are being hosted on an external domain. (Default `FALSE`) -## TALK_FACEBOOK_APP_ID - -The Facebook App ID for your Facebook Login enabled app. You can learn more -about getting a Facebook App ID at the -[Facebook Developers Portal](https://developers.facebook.com) -or by visiting the -[Creating an App ID](https://developers.facebook.com/docs/apps/register) -guide. This is only required while the `talk-plugin-facebook-auth` plugin is -enabled. - -## TALK_FACEBOOK_APP_SECRET - -The Facebook App Secret for your Facebook Login enabled app. You can learn more -about getting a Facebook App Secret at the -[Facebook Developers Portal](https://developers.facebook.com) -or by visiting the -[Creating an App ID](https://developers.facebook.com/docs/apps/register) -guide. This is only required while the `talk-plugin-facebook-auth` plugin is -enabled. - -## TALK_GOOGLE_CLIENT_ID - -The Google OAuth2 client ID for your Google login web app. You can learn more -about getting a Google Client ID at the -[Google API Console](https://console.developers.google.com/apis/){:target="_blank"}. - -You will need to enable the Google+ API in the dashboard and create credentials -for a new OAuth client ID web application. The authorized JavaScript origin -should be set to the Talk domain, and the authorized redirect URI should be set -to http:///api/v1/auth/google/callback. This is only required while -the `talk-plugin-google-auth` plugin is enabled. - -## TALK_GOOGLE_CLIENT_SECRET - -The Google OAuth2 client ID for your Google login web app. You can learn more -about getting a Google Client ID at the -[Google API Console](https://console.developers.google.com/apis/){:target="_blank"}. - -You will need to enable the Google+ API in the dashboard and create credentials -for a new OAuth client ID web application. The authorized JavaScript origin -should be set to the Talk domain, and the authorized redirect URI should be set -to http:///api/v1/auth/google/callback. This is only required while -the `talk-plugin-google-auth` plugin is enabled. - ## TALK_HELMET_CONFIGURATION A JSON string representing the configuration passed to the diff --git a/docs/source/04-02-installing-plugins.md b/docs/source/04-02-installing-plugins.md deleted file mode 100644 index 18aafe100..000000000 --- a/docs/source/04-02-installing-plugins.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: Plugins Overview -permalink: /plugins/ ---- - -There are several ways to install plugins. - -### Default Plugins vs. Custom Plugins - -Talk ships with a default set of plugins, available in `plugins.default.json`. When you run Talk with just the default plugins, these are the plugins that will be enabled. - -If you want to use the additional plugins that are available, you can create a `plugins.json` file. If this file exists, Talk will use that to determine which plugins to use. - -### Installing a Plugin from npm - - -If you create your own plugin, you can publish the plugin to npm and use it in Talk. The npm package can be public (open source) or private. - -You would include this in your `plugins.json`: - -EXAMPLE HERE - -### Installing a Local Plugin - -If you host your own plugin on Github, you can enable it by adding this to your `plugins.json`: - -EXAMPLE HERE - -### Best Practice - - - diff --git a/docs/source/04-03-default-plugins.md b/docs/source/04-03-default-plugins.md deleted file mode 100644 index bd03ba34f..000000000 --- a/docs/source/04-03-default-plugins.md +++ /dev/null @@ -1,148 +0,0 @@ ---- -title: Default Plugins -permalink: /default-plugins/ -class: configuration -toc: true ---- - -The default Talk plugins can be found in the `plugins.default.json` file -[here](https://github.com/coralproject/talk/blob/master/plugins.default.json). -Talk ships out of the box with these plugins enabled. - -We ship [Additional Plugins](./additional-plugins/) with -Talk that are not enabled by default. You can enable these or disable these -default plugins by consulting the [Plugins Overview](./plugins/) -page. - -## talk-plugin-auth - -Source: [plugins/talk-plugin-auth](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-auth) - -Enables generic registration via an email address, a username, a password, and a -password confirmation. To sync Talk auth with your own auth systems, you can use -this plugin as a template. - -## talk-plugin-facebook-auth - -Source: [plugins/talk-plugin-auth](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-auth) - -Requires: [talk-plugin-facebook-auth](#talk-plugin-facebook-auth) - -Enables sign-in via Facebook via the server side passport middleware. - -Configuration: - -- [TALK_FACEBOOK_APP_ID](./configuration/#talk_facebook_app_id) (**required**) - See the existing documentation for the [TALK_FACEBOOK_APP_ID](./configuration/#talk_facebook_app_id). -- [TALK_FACEBOOK_APP_SECRET](./configuration/#talk_facebook_app_secret) (**required**) - See the existing documentation for the [TALK_FACEBOOK_APP_SECRET](./configuration/#talk_facebook_app_secret). - -## talk-plugin-featured-comments - -Source: [plugins/talk-plugin-featured-comments](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-featured-comments) - -Enables the ability for Moderators to feature and un-feature comments via the -Stream and the Admin. Featured comments show in a first-place tab on the Stream -if there are any featured comments on that story. - -## talk-plugin-respect - -Source: [plugins/talk-plugin-respect](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-respect) - -Enables a `respect` reaction button. Why a "respect" button, you ask? -[Read more here](https://mediaengagement.org/research/engagement-buttons/). - -## talk-plugin-comment-content - -Source: [plugins/talk-plugin-comment-content](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-comment-content) - -Pluginizes the text of a comment to support custom treatment of this text. This -plugin currently parses the given text to see if it contains a link, and makes -them clickable. - -## talk-plugin-ignore-user - -Source: [plugins/talk-plugin-ignore-user](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-ignore-user) - -Enables ability for users to ignore (or "mute") other users. If a user is -ignored, you will not see any of their comments. You can un-ignore a user via -the My Profile tab. - -## talk-plugin-permalink - -Source: [plugins/talk-plugin-permalink](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-permalink) - -Enables a `Link` button that will provide a permalink to the comment that can be -shared with others. - -## talk-plugin-viewing-options - -Source: [plugins/talk-plugin-viewing-options](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-viewing-options) - -Pluginizes the sorting/viewing options for a comment stream. - -## talk-plugin-sort-newest - -Source: [plugins/talk-plugin-sort-newest](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-sort-newest) - -Requires: [talk-plugin-viewing-options](#talk-plugin-viewing-options) - -Provides a sort for the newest comments first. This isn't necessarily required -as the default sort without options/plugins is newest first. - -## talk-plugin-sort-oldest - -Source: [plugins/talk-plugin-sort-oldest](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-sort-oldest) - -Requires: [talk-plugin-viewing-options](#talk-plugin-viewing-options) - -Provides a sort for the newest comments first. - -## talk-plugin-sort-most-respected - -Source: [plugins/talk-plugin-sort-most-respected](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-sort-most-respected) - -Requires: [talk-plugin-viewing-options](#talk-plugin-viewing-options), [talk-plugin-respect](#talk-plugin-respect) - -Provides a sort for the comments with the most `respect` reactions first. - -## talk-plugin-sort-most-replied - -Source: [plugins/talk-plugin-sort-most-replied](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-sort-most-replied) - -Requires: [talk-plugin-viewing-options](#talk-plugin-viewing-options) - -Provides a sort for the comments with the most replies first. - -## talk-plugin-offtopic - -Source: [plugins/talk-plugin-offtopic](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-offtopic) - -Allows the comment authors to tag their comment as `Off-Topic` which will add a -visible badge on the frontend to other users that their comment is off-topic. - -## talk-plugin-author-menu - -Source: [plugins/talk-plugin-author-menu](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-author-menu) - -Pluginizes the author's name on hover. - -## talk-plugin-member-since - -Source: [plugins/talk-plugin-member-since](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-member-since) - -Requires: [talk-plugin-author-menu](#talk-plugin-author-menu) - -Displays the date that the user was created as a `Member Since ${created_at}`. - -## talk-plugin-moderation-actions - -Source: [plugins/talk-plugin-moderation-actions](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-moderation-actions) - -Enables in-stream moderation so that Moderators can reject, approve comments, -as well as ban users, directly from the comment stream. When [talk-plugin-featured-comments](#talk-plugin-featured-comments) is enabled - -## talk-plugin-flag-details - -Source: [plugins/talk-plugin-flag-details](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-flag-details) - -Pluginizes the Flag Details area of comments in the Moderation Queues to display -data. Some basic details are already included on flags by default. diff --git a/docs/source/04-04-additional-plugins.md b/docs/source/04-04-additional-plugins.md deleted file mode 100644 index 1877aa942..000000000 --- a/docs/source/04-04-additional-plugins.md +++ /dev/null @@ -1,169 +0,0 @@ ---- -title: Additional Plugins -permalink: /additional-plugins/ -class: configuration -toc: true ---- - -Talk ships with several plugins that aren't enabled by default. These plugins -can be enabled by consulting the [Plugins Overview](./plugins/) -page. - -## talk-plugin-like - -Source: [plugins/talk-plugin-like](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-like) - -Enables a `like` reaction button. - -## talk-plugin-sort-most-liked - -Source: [plugins/talk-plugin-sort-most-liked](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-sort-most-liked) - -Requires: [talk-plugin-viewing-options](./default-plugins/#talk-plugin-viewing-options), [talk-plugin-like](#talk-plugin-like) - -Provides a sort for the comments with the most `like` reactions first. - -## talk-plugin-love - -Source: [plugins/talk-plugin-love](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-love) - -Enables a `love` reaction button. - -## talk-plugin-sort-most-loved - -Source: [plugins/talk-plugin-sort-most-loved](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-sort-most-loved) - -Requires: [talk-plugin-viewing-options](./default-plugins/#talk-plugin-viewing-options), [talk-plugin-love](#talk-plugin-love) - -Provides a sort for the comments with the most `love` reactions first. - -## talk-plugin-remember-sort - -Source: [plugins/talk-plugin-remember-sort](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-remember-sort) - -Requires: [talk-plugin-viewing-options](./default-plugins/#talk-plugin-viewing-options) - -Enables saving a user’s last sort selection as they browse other articles. - -## talk-plugin-deep-reply-count - -Source: [plugins/talk-plugin-deep-reply-count](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-deep-reply-count) - -Enables counting of comments to include replies via a new graph edge. Not -recommended for large installations as it will unreasonably reduce the query -efficiency to compute this number. - -## talk-plugin-slack-notifications - -Source: [plugins/talk-plugin-slack-notifications](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-slack-notifications) - -Enables all new comments that are written to be posted to a Slack channel as -well. Configure an -[Incoming Webhook](https://api.slack.com/incoming-webhooks) -app and provide that url in the form of the `SLACK_WEBHOOK_URL` -detailed below. - -*Warning: On high volume sites, this means every single comment will flow into -Slack, if this isn't what you want, be sure to use the provided plugin as a -recipe to further customize the behavior*. - -Configuration: - -- `SLACK_WEBHOOK_URL` (**required**) - The webhook url that will be - used to post new comments to. - -## talk-plugin-toxic-comments - -Source: [plugins/talk-plugin-toxic-comments](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-toxic-comments) - -Using the [Perspective API](http://perspectiveapi.com/), this -plugin will warn users and reject comments that exceed the predefined toxicity -threshold. For more information on what Toxic Comments are, check out the -[Toxic Comments](./toxic-comments/) documentation. - -Configuration: - -- `TALK_PERSPECTIVE_API_KEY` (**required**) - The API Key for Perspective. You - can register and get your own key at [http://perspectiveapi.com/](http://perspectiveapi.com/). -- `TALK_TOXICITY_THRESHOLD` - If the comments toxicity exceeds this threshold, - the comment will be rejected. (Default `0.8`) -- `TALK_PERSPECTIVE_API_ENDPOINT` - API Endpoint for hitting the - perspective API. (Default `https://commentanalyzer.googleapis.com/v1alpha1`) -- `TALK_PERSPECTIVE_TIMEOUT` - The timeout for sending a comment to - be processed before it will skip the toxicity analysis, parsed by - [ms](https://www.npmjs.com/package/ms). (Default `300ms`) -- `TALK_PERSPECTIVE_DO_NOT_STORE` - Whether the API is permitted to store comment and context from this request. Stored comments will be used for future research and community model building purposes to improve the API over time. (Default `true`) [Perspective API - Analize Comment Request](https://github.com/conversationai/perspectiveapi/blob/master/api_reference.md#analyzecomment-request) - -## talk-plugin-subscriber - -Source: [plugins/talk-plugin-subscriber](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-subscriber) - -Enables a `Subscriber` badge to be added to comments where the author has the -`SUBSCRIBER` tag. This must match with a custom auth integration that adds the -tag to the users that are subscribed to the service. - -## talk-plugin-akismet - -Source: [plugins/talk-plugin-akismet](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-akismet) - -Enables spam detection from [Akismet](https://akismet.com/). Comments will be passed to the Akismet API for spam detection. If a comment -is determined to be spam, it will prompt the user, indicating that the comment might be considered spam. If the user continues after this -point with the still spam-like comment, the comment will be reported as containing spam, and sent for moderator approval. - -**Note: [Akismet](https://akismet.com/) is a premium service, charges may apply.** - -Configuration: - -- `TALK_AKISMET_API_KEY` (**required**) - The Akismet API key located on your account page. -- `TALK_AKISMET_SITE` (**required**) - The URL where you are embedding the comment stream on to provide context to Akismet. If you're hosting talk on https://talk.mynews.org/, and your news site is https://mynews.org/, then you should set this parameter to `https://mynews.org/` - -## talk-plugin-notifications - -Source: [plugins/talk-plugin-notifications](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-notifications){:target="_blank"} - -Enables the Notification system for sending out enabled email notifications to -users when they interact with Talk. By itself, this plugin will not send -anything. You need to enable one of the `talk-plugin-notifications-category-*` plugins. - -**Note that all `talk-plugin-notifications-*` plugins must be registered -*before* this plugin in order to work. For example:** - -```js -{ - "server": [ - // ... - "talk-plugin-notifications-category-reply", - "talk-plugin-notifications", - // ... - ] -} -``` -{:.no-copy} - -Configuration: - -- `DISABLE_REQUIRE_EMAIL_VERIFICATIONS` - When `TRUE`, it will disable the verification email check before sending notifications for those emails. **Note that organizations implementing a custom authentication system _must_ disable this feature, as they don't use our integrated auth**. (Default `FALSE`). - -### talk-plugin-notifications-category-reply -{:.param} - -Source: [plugins/talk-plugin-notifications-category-reply](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-notifications-category-reply){:target="_blank"} - -Replies made to each user will trigger an email to be sent with the notification -details if enabled. - -### talk-plugin-notifications-category-featured -{:.param} - -Source: [plugins/talk-plugin-notifications-category-featured](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-notifications-category-featured){:target="_blank"} - -When a comment is featured (via the `talk-plugin-featured-comments` plugin), the -user will receive a notification email. - -### talk-plugin-notifications-category-staff -{:.param} - -Source: [plugins/talk-plugin-notifications-category-staff](https://github.com/coralproject/talk/tree/master/plugins/talk-plugin-notifications-category-staff){:target="_blank"} - -Replies made to each user by a staff member will trigger an email to be sent -with the notification details if enabled. diff --git a/docs/source/_data/plugins.yml b/docs/source/_data/plugins.yml new file mode 100644 index 000000000..c44865fa3 --- /dev/null +++ b/docs/source/_data/plugins.yml @@ -0,0 +1,72 @@ +- name: talk-plugin-akismet + description: Enables auto-moderation from Akismet. +- name: talk-plugin-auth + description: Enables internal authentication from Coral. +- name: talk-plugin-author-menu + description: Enables the comment author name plugin area. +- name: talk-plugin-comment-content + description: Linkifies comment content that contains links. +- name: talk-plugin-deep-reply-count + description: Enables deep reply count graph edge including all decendant replies. +- name: talk-plugin-facebook-auth + description: Enables a Facebook login strategy. +- name: talk-plugin-featured-comments + description: Allows comments to be featured for other users. +- name: talk-plugin-flag-details + description: Show flag details in the admin panel. +- name: talk-plugin-google-auth + description: Enables a Google login strategy. +- name: talk-plugin-ignore-user + description: Allows other users to ignore one another to hide their comments from view. +- name: talk-plugin-like + description: Allows the like reaction for comments +- name: talk-plugin-love + description: Allows the love reaction for comments +- name: talk-plugin-member-since + description: Shows the users created at time as their member since date. +- name: talk-plugin-moderation-actions + description: Allows moderators to take actions on comments from the comment stream. +- name: talk-plugin-notifications + description: The base notification plugin which enables notifications to be sent. +- name: talk-plugin-notifications-category-featured + description: Enables the on-featured notification. +- name: talk-plugin-notifications-category-reply + description: Enables the on-reply notification. +- name: talk-plugin-notifications-category-staff + description: Enables the on-staff-reply notification. +- name: talk-plugin-notifications-digest-daily + description: Enables daily digesting of comment notifications as an option. +- name: talk-plugin-notifications-digest-hourly + description: Enables hourly digesting of comment notifications as an option. +- name: talk-plugin-offtopic + description: Allows users to mark a comment as off-topic when they create it. +- name: talk-plugin-permalink + description: Shows a Link button on comments for direct-linking to a comment. +- name: talk-plugin-remember-sort + description: Remembers the sort selection made by a user. +- name: talk-plugin-respect + description: Enables the respect reaction for comments. +- name: talk-plugin-rich-text + description: Enables rich text plugins that save data as HTML. +- name: talk-plugin-rich-text-pell + description: Enables the pell rich text editor. +- name: talk-plugin-slack-notifications + description: Sends all comments as notifications to a slack channel +- name: talk-plugin-sort-most-liked + description: Enables sorting by most liked. +- name: talk-plugin-sort-most-loved + description: Enables sorting by most loved. +- name: talk-plugin-sort-most-replied + description: Enables sorting by most replied. +- name: talk-plugin-sort-most-respected + description: Enables sorting by most respected. +- name: talk-plugin-sort-newest + description: Enables sorting by newest. +- name: talk-plugin-sort-oldest + description: Enables sorting by oldest. +- name: talk-plugin-subscriber + description: Shows a subscriber tag on users that have the tag in the database. +- name: talk-plugin-toxic-comments + description: Enables auto-moderation from Google's Perspective API. +- name: talk-plugin-viewing-options + description: Enables the dropdown used to display sorting options on the embed stream. \ No newline at end of file diff --git a/docs/source/02-03-authentication.md b/docs/source/integrating/authentication.md similarity index 57% rename from docs/source/02-03-authentication.md rename to docs/source/integrating/authentication.md index 29ab8e15d..9673d7365 100644 --- a/docs/source/02-03-authentication.md +++ b/docs/source/integrating/authentication.md @@ -1,17 +1,39 @@ --- title: Authenticating with Talk -permalink: /authentication/ +permalink: /integrating/authentication/ --- +You can integrate Talk with any external authentication service that will enable +seamless single sign-on for users within your organization. There are a few +methods of doing so: + +1. Passport Middleware +2. Custom Token Integration + +Both methods work, but there are product decisions that will affect the overall +choice. + +## Passport Middleware + +You would choose the **Passport Middleware** route when you are OK using an auth +that is triggered from inside Talk that is not connected to an external auth +state (you don't use the auth anywhere else now). A great example of this is our +Facebook plugin. + +## Custom Token Integration + You can integrate Talk with any authentication service to enable single sign-on for users. The steps to do that are: -### Create auth middleware +## Create auth middleware + Create a middleware service that generates a JWT, which is passed as an option to the Talk embed code (see https://github.com/coralproject/talk/blob/master/client/coral-embed/src/index.js#L36) OR embed bridge (see https://github.com/coralproject/talk/blob/master/client/coral-embed/src/index.js#L44). -### Generate a key to sign the JWT +## Generate a key to sign the JWT + Use https://github.com/coralproject/coralcert to generate a key with which to sign the JWTs and specify the secret as an environment variable (see https://coralproject.github.io/talk/advanced-configuration/#talk_jwt_secret). You may also provide configuration for other optional JWT components (see https://coralproject.github.io/talk/advanced-configuration/#). -### Create server plugin to handle auth +## Create server plugin to handle auth + Provide an implementation for the tokenUserNotFound hook within a server side plugin (see https://github.com/coralproject/talk/blob/ef49d9a3d2acc4d2fc03b00e0c872dfbc57f005a/docs/_docs/04-04-plugins-server.md#field-tokenusernotfound) diff --git a/docs/source/02-05-configuring-admin.md b/docs/source/integrating/configuring-admin.md similarity index 96% rename from docs/source/02-05-configuring-admin.md rename to docs/source/integrating/configuring-admin.md index 9ba3fad8b..14de5bf43 100644 --- a/docs/source/02-05-configuring-admin.md +++ b/docs/source/integrating/configuring-admin.md @@ -1,6 +1,6 @@ --- title: Configuring the Talk Admin -permalink: /configuring-admin/ +permalink: /integrating/configuring-admin/ --- Using plugins and configuration variables, you can modify the way the Admin looks and how moderation works. diff --git a/docs/source/02-04-configuring-comment-stream.md b/docs/source/integrating/configuring-comment-stream.md similarity index 98% rename from docs/source/02-04-configuring-comment-stream.md rename to docs/source/integrating/configuring-comment-stream.md index 09f7e683c..110560de0 100644 --- a/docs/source/02-04-configuring-comment-stream.md +++ b/docs/source/integrating/configuring-comment-stream.md @@ -1,6 +1,6 @@ --- title: Configuring the Talk Comment Stream -permalink: /configuring-comment-stream/ +permalink: /integrating/configuring-comment-stream/ --- Using plugins and configuration variables, you can modify the way the Talk comment stream behaves. Here are some common configuration options: diff --git a/docs/source/02-07-event-tracking-metrics.md b/docs/source/integrating/event-tracking-metrics.md similarity index 97% rename from docs/source/02-07-event-tracking-metrics.md rename to docs/source/integrating/event-tracking-metrics.md index be52b8cdf..d0ca131ad 100644 --- a/docs/source/02-07-event-tracking-metrics.md +++ b/docs/source/integrating/event-tracking-metrics.md @@ -1,6 +1,6 @@ --- title: Tracking Talk Events and Metrics -permalink: /event-tracking-metrics/ +permalink: /integrating/event-tracking-metrics/ --- Talk supports event emitting via Redux, Apollo and GraphQL. This means that common actions taken within Talk, such as successfully posting a comment, posting a reaction, or changing a setting, are automatically emitted from Talk. To send these events to your analytics tool of choice, however, will require some integration on your part. diff --git a/docs/source/02-06-notifications.md b/docs/source/integrating/notifications.md similarity index 98% rename from docs/source/02-06-notifications.md rename to docs/source/integrating/notifications.md index 9a4cfbf7b..470632907 100644 --- a/docs/source/02-06-notifications.md +++ b/docs/source/integrating/notifications.md @@ -1,6 +1,6 @@ --- title: Notifications -permalink: /notifications/ +permalink: /integrating/notifications/ --- Talk currently supports 3 types of email notifications. diff --git a/docs/source/02-08-styling-css.md b/docs/source/integrating/styling-css.md similarity index 92% rename from docs/source/02-08-styling-css.md rename to docs/source/integrating/styling-css.md index 4fc7b360d..aad78d0b2 100644 --- a/docs/source/02-08-styling-css.md +++ b/docs/source/integrating/styling-css.md @@ -1,6 +1,6 @@ --- title: Styling Talk with CSS -permalink: /styling-css/ +permalink: /integrating/styling-css/ --- You can add your own stylesheet in Admin > Configure > Tech Settings. diff --git a/docs/source/02-09-translations-i18n.md b/docs/source/integrating/translations-i18n.md similarity index 97% rename from docs/source/02-09-translations-i18n.md rename to docs/source/integrating/translations-i18n.md index 621758f42..2466dcdc0 100644 --- a/docs/source/02-09-translations-i18n.md +++ b/docs/source/integrating/translations-i18n.md @@ -1,6 +1,6 @@ --- title: Translations and i18n -permalink: /translations-i18n/ +permalink: /integrating/translations-i18n/ --- We’re so proud to have received submissions from a lot of 3rd party contributors translating Talk into their own languages. diff --git a/docs/source/plugin/talk-plugin-akismet.md b/docs/source/plugin/talk-plugin-akismet.md new file mode 120000 index 000000000..2a77ae8b7 --- /dev/null +++ b/docs/source/plugin/talk-plugin-akismet.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-akismet/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-auth.md b/docs/source/plugin/talk-plugin-auth.md new file mode 120000 index 000000000..1442b36d1 --- /dev/null +++ b/docs/source/plugin/talk-plugin-auth.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-auth/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-author-menu.md b/docs/source/plugin/talk-plugin-author-menu.md new file mode 120000 index 000000000..af57901d5 --- /dev/null +++ b/docs/source/plugin/talk-plugin-author-menu.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-author-menu/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-comment-content.md b/docs/source/plugin/talk-plugin-comment-content.md new file mode 120000 index 000000000..cc1806796 --- /dev/null +++ b/docs/source/plugin/talk-plugin-comment-content.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-comment-content/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-deep-reply-count.md b/docs/source/plugin/talk-plugin-deep-reply-count.md new file mode 120000 index 000000000..8d3f2ff12 --- /dev/null +++ b/docs/source/plugin/talk-plugin-deep-reply-count.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-deep-reply-count/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-facebook-auth.md b/docs/source/plugin/talk-plugin-facebook-auth.md new file mode 120000 index 000000000..e38577339 --- /dev/null +++ b/docs/source/plugin/talk-plugin-facebook-auth.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-facebook-auth/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-featured-comments.md b/docs/source/plugin/talk-plugin-featured-comments.md new file mode 120000 index 000000000..18ab6a25d --- /dev/null +++ b/docs/source/plugin/talk-plugin-featured-comments.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-featured-comments/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-flag-details.md b/docs/source/plugin/talk-plugin-flag-details.md new file mode 120000 index 000000000..79d948982 --- /dev/null +++ b/docs/source/plugin/talk-plugin-flag-details.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-flag-details/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-google-auth.md b/docs/source/plugin/talk-plugin-google-auth.md new file mode 120000 index 000000000..c32597a7c --- /dev/null +++ b/docs/source/plugin/talk-plugin-google-auth.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-google-auth/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-ignore-user.md b/docs/source/plugin/talk-plugin-ignore-user.md new file mode 120000 index 000000000..0f11862f1 --- /dev/null +++ b/docs/source/plugin/talk-plugin-ignore-user.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-ignore-user/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-like.md b/docs/source/plugin/talk-plugin-like.md new file mode 120000 index 000000000..e96dc4d8e --- /dev/null +++ b/docs/source/plugin/talk-plugin-like.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-like/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-love.md b/docs/source/plugin/talk-plugin-love.md new file mode 120000 index 000000000..ed631ba79 --- /dev/null +++ b/docs/source/plugin/talk-plugin-love.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-love/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-member-since.md b/docs/source/plugin/talk-plugin-member-since.md new file mode 120000 index 000000000..412038506 --- /dev/null +++ b/docs/source/plugin/talk-plugin-member-since.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-member-since/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-moderation-actions.md b/docs/source/plugin/talk-plugin-moderation-actions.md new file mode 120000 index 000000000..1236ddc02 --- /dev/null +++ b/docs/source/plugin/talk-plugin-moderation-actions.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-moderation-actions/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-notifications-category-featured.md b/docs/source/plugin/talk-plugin-notifications-category-featured.md new file mode 120000 index 000000000..cce9e0335 --- /dev/null +++ b/docs/source/plugin/talk-plugin-notifications-category-featured.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-notifications-category-featured/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-notifications-category-reply.md b/docs/source/plugin/talk-plugin-notifications-category-reply.md new file mode 120000 index 000000000..819c28c10 --- /dev/null +++ b/docs/source/plugin/talk-plugin-notifications-category-reply.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-notifications-category-reply/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-notifications-category-staff.md b/docs/source/plugin/talk-plugin-notifications-category-staff.md new file mode 120000 index 000000000..3513048bb --- /dev/null +++ b/docs/source/plugin/talk-plugin-notifications-category-staff.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-notifications-category-staff/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-notifications-digest-daily.md b/docs/source/plugin/talk-plugin-notifications-digest-daily.md new file mode 120000 index 000000000..c090510d6 --- /dev/null +++ b/docs/source/plugin/talk-plugin-notifications-digest-daily.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-notifications-digest-daily/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-notifications-digest-hourly.md b/docs/source/plugin/talk-plugin-notifications-digest-hourly.md new file mode 120000 index 000000000..cd2b24b52 --- /dev/null +++ b/docs/source/plugin/talk-plugin-notifications-digest-hourly.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-notifications-digest-hourly/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-notifications.md b/docs/source/plugin/talk-plugin-notifications.md new file mode 120000 index 000000000..59b34908a --- /dev/null +++ b/docs/source/plugin/talk-plugin-notifications.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-notifications/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-offtopic.md b/docs/source/plugin/talk-plugin-offtopic.md new file mode 120000 index 000000000..8629abe39 --- /dev/null +++ b/docs/source/plugin/talk-plugin-offtopic.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-offtopic/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-permalink.md b/docs/source/plugin/talk-plugin-permalink.md new file mode 120000 index 000000000..09e7c4ffa --- /dev/null +++ b/docs/source/plugin/talk-plugin-permalink.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-permalink/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-remember-sort.md b/docs/source/plugin/talk-plugin-remember-sort.md new file mode 120000 index 000000000..800b48dd4 --- /dev/null +++ b/docs/source/plugin/talk-plugin-remember-sort.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-remember-sort/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-respect.md b/docs/source/plugin/talk-plugin-respect.md new file mode 120000 index 000000000..4e0338336 --- /dev/null +++ b/docs/source/plugin/talk-plugin-respect.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-respect/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-rich-text-pell.md b/docs/source/plugin/talk-plugin-rich-text-pell.md new file mode 120000 index 000000000..e2162a51b --- /dev/null +++ b/docs/source/plugin/talk-plugin-rich-text-pell.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-rich-text-pell/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-rich-text.md b/docs/source/plugin/talk-plugin-rich-text.md new file mode 120000 index 000000000..3d8d988ce --- /dev/null +++ b/docs/source/plugin/talk-plugin-rich-text.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-rich-text/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-slack-notifications.md b/docs/source/plugin/talk-plugin-slack-notifications.md new file mode 120000 index 000000000..7884e461e --- /dev/null +++ b/docs/source/plugin/talk-plugin-slack-notifications.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-slack-notifications/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-sort-most-liked.md b/docs/source/plugin/talk-plugin-sort-most-liked.md new file mode 120000 index 000000000..20776efef --- /dev/null +++ b/docs/source/plugin/talk-plugin-sort-most-liked.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-sort-most-liked/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-sort-most-loved.md b/docs/source/plugin/talk-plugin-sort-most-loved.md new file mode 120000 index 000000000..ce7e885f5 --- /dev/null +++ b/docs/source/plugin/talk-plugin-sort-most-loved.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-sort-most-loved/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-sort-most-replied.md b/docs/source/plugin/talk-plugin-sort-most-replied.md new file mode 120000 index 000000000..af1df1477 --- /dev/null +++ b/docs/source/plugin/talk-plugin-sort-most-replied.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-sort-most-replied/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-sort-most-respected.md b/docs/source/plugin/talk-plugin-sort-most-respected.md new file mode 120000 index 000000000..c51be93b2 --- /dev/null +++ b/docs/source/plugin/talk-plugin-sort-most-respected.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-sort-most-respected/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-sort-newest.md b/docs/source/plugin/talk-plugin-sort-newest.md new file mode 120000 index 000000000..b74a5dbc9 --- /dev/null +++ b/docs/source/plugin/talk-plugin-sort-newest.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-sort-newest/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-sort-oldest.md b/docs/source/plugin/talk-plugin-sort-oldest.md new file mode 120000 index 000000000..a8171c4f8 --- /dev/null +++ b/docs/source/plugin/talk-plugin-sort-oldest.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-sort-oldest/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-subscriber.md b/docs/source/plugin/talk-plugin-subscriber.md new file mode 120000 index 000000000..548d4a7e2 --- /dev/null +++ b/docs/source/plugin/talk-plugin-subscriber.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-subscriber/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-toxic-comments.md b/docs/source/plugin/talk-plugin-toxic-comments.md new file mode 120000 index 000000000..bcd0fa00a --- /dev/null +++ b/docs/source/plugin/talk-plugin-toxic-comments.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-toxic-comments/README.md \ No newline at end of file diff --git a/docs/source/plugin/talk-plugin-viewing-options.md b/docs/source/plugin/talk-plugin-viewing-options.md new file mode 120000 index 000000000..f9a70695e --- /dev/null +++ b/docs/source/plugin/talk-plugin-viewing-options.md @@ -0,0 +1 @@ +../../../plugins/talk-plugin-viewing-options/README.md \ No newline at end of file diff --git a/docs/source/04-01-plugins-overview.md b/docs/source/plugins/overview.md similarity index 99% rename from docs/source/04-01-plugins-overview.md rename to docs/source/plugins/overview.md index 37c3c318e..03bb8dcee 100644 --- a/docs/source/04-01-plugins-overview.md +++ b/docs/source/plugins/overview.md @@ -1,6 +1,7 @@ --- title: Plugins Overview permalink: /plugins/ +toc: true --- Plugins are the integration point between the Talk core code and custom diff --git a/docs/source/plugins/plugins-directory.md b/docs/source/plugins/plugins-directory.md new file mode 100644 index 000000000..ca9b26734 --- /dev/null +++ b/docs/source/plugins/plugins-directory.md @@ -0,0 +1,10 @@ +--- +title: Plugins Directory +permalink: /plugins-directory/ +layout: plugins +data: plugins +--- + +Talk provides a growing ecosystem of plugins that interact with our extensive +Server and Client API's. Below you can search for a plugin to use with Talk and +discover what their requirements and configuration are. \ No newline at end of file diff --git a/docs/themes/coral/layout/partial/footer.swig b/docs/themes/coral/layout/partial/footer.swig index e30d96b58..c8e8fa05d 100644 --- a/docs/themes/coral/layout/partial/footer.swig +++ b/docs/themes/coral/layout/partial/footer.swig @@ -6,7 +6,8 @@ -{{ js(['js/highlight.min.js', 'js/main.js']) }} + +{{ js(['js/highlight.min.js', 'js/plugins.js', 'js/main.js']) }} \ No newline at end of file diff --git a/docs/themes/coral/scripts/lunr.js b/docs/themes/coral/scripts/lunr.js new file mode 100644 index 000000000..69ab7edf0 --- /dev/null +++ b/docs/themes/coral/scripts/lunr.js @@ -0,0 +1,19 @@ +/* global hexo */ + +const lunr = require('lunr'); +const { sortBy, assign } = require('lodash'); + +// Based on https://github.com/hexojs/site/blob/8e8ed4901769abbf76263125f82832df76ced58b/scripts/helpers.js#L121-L134 +hexo.extend.helper.register('lunr_index', data => { + const index = lunr(function() { + this.field('name', { boost: 10 }); + this.field('description'); + this.ref('id'); + + sortBy(data, 'name').forEach((item, i) => { + this.add(assign({ id: i }, item)); + }); + }); + + return JSON.stringify(index); +}); diff --git a/docs/themes/coral/source/css/talk.scss b/docs/themes/coral/source/css/talk.scss index a15c7a84e..06ddf7557 100644 --- a/docs/themes/coral/source/css/talk.scss +++ b/docs/themes/coral/source/css/talk.scss @@ -292,7 +292,8 @@ pre { @extend .coral-link; } ul:not(.toc__menu) li a, - ol li a { + ol li a, + dd > a { @extend .coral-link; } } @@ -440,3 +441,7 @@ a.brand { } } } + +.plugin { + display: none; +} \ No newline at end of file diff --git a/docs/themes/coral/source/js/plugins.js b/docs/themes/coral/source/js/plugins.js new file mode 100644 index 000000000..83f14d356 --- /dev/null +++ b/docs/themes/coral/source/js/plugins.js @@ -0,0 +1,69 @@ +/* global lunr */ +/* eslint-env browser */ + +// Sourced from https://github.com/hexojs/site/blob/8e8ed4901769abbf76263125f82832df76ced58b/themes/navy/source/js/plugins.js. +(function() { + 'use strict'; + + var elements = document.getElementsByClassName('plugin'); + var $count = document.getElementById('plugin-list-count'); + var $input = document.getElementById('plugin-search-input'); + var elementLen = elements.length; + var index = lunr.Index.load(window.SEARCH_INDEX); + + function updateCount(count) { + $count.innerHTML = count + (count === 1 ? ' plugin' : ' plugins'); + } + + function addClass(elem, className) { + var classList = elem.classList; + + if (!classList.contains(className)) { + classList.add(className); + } + } + + function removeClass(elem, className) { + var classList = elem.classList; + + if (classList.contains(className)) { + classList.remove(className); + } + } + + function search(value) { + var result = index.search('*' + value + '* ' + value); + var len = result.length; + var selected = {}; + var i = 0; + + for (i = 0; i < len; i++) { + selected[result[i].ref] = true; + } + + for (i = 0; i < elementLen; i++) { + if (selected[i]) { + addClass(elements[i], 'd-block'); + } else { + removeClass(elements[i], 'd-block'); + } + } + + updateCount(len); + } + + function displayAll() { + for (var i = 0; i < elementLen; i++) { + addClass(elements[i], 'd-block'); + } + + updateCount(elements.length); + } + + $input.addEventListener('input', function() { + var value = this.value; + + if (!value) return displayAll(); + search(value); + }); +})(); diff --git a/plugins/talk-plugin-akismet/README.md b/plugins/talk-plugin-akismet/README.md new file mode 100644 index 000000000..359bf2a05 --- /dev/null +++ b/plugins/talk-plugin-akismet/README.md @@ -0,0 +1,21 @@ +--- +title: talk-plugin-akismet +permalink: /plugin/talk-plugin-akismet/ +layout: plugin +plugin: + name: talk-plugin-akismet + provides: + - Server + - Client +--- + +Enables spam detection from [Akismet](https://akismet.com/). Comments will be passed to the Akismet API for spam detection. If a comment +is determined to be spam, it will prompt the user, indicating that the comment might be considered spam. If the user continues after this +point with the still spam-like comment, the comment will be reported as containing spam, and sent for moderator approval. + +**Note: [Akismet](https://akismet.com/) is a premium service, charges may apply.** + +Configuration: + +- `TALK_AKISMET_API_KEY` (**required**) - The Akismet API key located on your account page. +- `TALK_AKISMET_SITE` (**required**) - The URL where you are embedding the comment stream on to provide context to Akismet. If you're hosting talk on https://talk.mynews.org/, and your news site is https://mynews.org/, then you should set this parameter to `https://mynews.org/` \ No newline at end of file diff --git a/plugins/talk-plugin-auth/README.md b/plugins/talk-plugin-auth/README.md new file mode 100644 index 000000000..241b8aa9d --- /dev/null +++ b/plugins/talk-plugin-auth/README.md @@ -0,0 +1,15 @@ +--- +title: talk-plugin-auth +permalink: /plugin/talk-plugin-auth/ +layout: plugin +plugin: + name: talk-plugin-auth + provides: + - Client +--- + +This provides the base plugin that is the basis for all auth based plugins that +utilize our internal authentication system. + +To sync Talk auth with your own auth systems, you can use this plugin as a +template. diff --git a/plugins/talk-plugin-author-menu/README.md b/plugins/talk-plugin-author-menu/README.md new file mode 100644 index 000000000..93bcf0b5f --- /dev/null +++ b/plugins/talk-plugin-author-menu/README.md @@ -0,0 +1,19 @@ +--- +title: talk-plugin-author-menu +permalink: /plugin/talk-plugin-author-menu/ +layout: plugin +plugin: + name: talk-plugin-author-menu + provides: + - Client +--- + +Enables plugins to integrate into the embed stream at the author name location. +We have recipes for showing the commenter's "member since" date, and to show a +subscriber badge. These will require some integration on your side to connect +them to the data source that houses this information. + +- [talk-plugin-member-since](/talk/plugin/talk-plugin-member-since) +- [talk-plugin-subscriber](/talk/plugin/talk-plugin-subscriber) + +To get started, check out our [Talk Recipes](https://github.com/coralproject/talk-recipes). \ No newline at end of file diff --git a/plugins/talk-plugin-comment-content/README.md b/plugins/talk-plugin-comment-content/README.md new file mode 100644 index 000000000..d4cb0b6d7 --- /dev/null +++ b/plugins/talk-plugin-comment-content/README.md @@ -0,0 +1,14 @@ +--- +title: talk-plugin-comment-content +permalink: /plugin/talk-plugin-comment-content/ +layout: plugin +plugin: + name: talk-plugin-comment-content + provides: + - Client +--- + +Pluginizes the text of a comment to support custom treatment of this text. This +plugin currently parses the given text to see if it contains a link, and makes +them clickable using +[react-linkify](https://www.npmjs.com/package/react-linkify). \ No newline at end of file diff --git a/plugins/talk-plugin-deep-reply-count/README.md b/plugins/talk-plugin-deep-reply-count/README.md new file mode 100644 index 000000000..f8454f54c --- /dev/null +++ b/plugins/talk-plugin-deep-reply-count/README.md @@ -0,0 +1,15 @@ +--- +title: talk-plugin-deep-reply-count +permalink: /plugin/talk-plugin-deep-reply-count/ +layout: plugin +plugin: + name: talk-plugin-deep-reply-count + provides: + - Server +--- + +The Deep Reply Count plugin will add a new graph edge, `Comment.deepReplyCount` +that will return the count of all descendant replies. + +**Warning: Enabling the talk-plugin-deep-reply-count plugin introduces a significant +performance impact on larger sites, use with care.** \ No newline at end of file diff --git a/plugins/talk-plugin-deep-reply-count/index.js b/plugins/talk-plugin-deep-reply-count/index.js index cec411114..4c06329a7 100644 --- a/plugins/talk-plugin-deep-reply-count/index.js +++ b/plugins/talk-plugin-deep-reply-count/index.js @@ -4,7 +4,7 @@ const DataLoader = require('dataloader'); const CommentModel = require('../../models/comment'); console.warn( - 'Enabling the talk-plugin-deep-reply-count plugin introduces a signifigant performance impact on larger sites, use with care.' + 'Enabling the talk-plugin-deep-reply-count plugin introduces a significant performance impact on larger sites, use with care.' ); // genDeepCommentCount will return the deep comment count for a given parent id. @@ -72,7 +72,7 @@ module.exports = { typeDefs: ` type Comment { - # deepReplyCount is the count of all decendant replies. + # deepReplyCount is the count of all descendant replies. deepReplyCount: Int } `, diff --git a/plugins/talk-plugin-facebook-auth/README.md b/plugins/talk-plugin-facebook-auth/README.md new file mode 100644 index 000000000..19d003150 --- /dev/null +++ b/plugins/talk-plugin-facebook-auth/README.md @@ -0,0 +1,30 @@ +--- +title: talk-plugin-facebook-auth +permalink: /plugin/talk-plugin-facebook-auth/ +layout: plugin +plugin: + name: talk-plugin-facebook-auth + depends: + - name: talk-plugin-auth + provides: + - Server + - Client +--- + +Enables sign-in via Facebook via the server side passport middleware. + +Configuration: + +- `TALK_FACEBOOK_APP_ID` (**required**) - The Facebook App ID for your Facebook + Login enabled app. You can learn more about getting a Facebook App ID at the + [Facebook Developers Portal](https://developers.facebook.com) or by visiting + the [Creating an App ID](https://developers.facebook.com/docs/apps/register) + guide. This is only required while the `talk-plugin-facebook-auth` plugin is + enabled. +- `TALK_FACEBOOK_APP_SECRET` (**required**) - The Facebook App Secret for your + Facebook Login enabled app. You can learn more about getting a Facebook App + Secret at the [Facebook Developers Portal](https://developers.facebook.com) + or by visiting the + [Creating an App ID](https://developers.facebook.com/docs/apps/register) + guide. This is only required while the `talk-plugin-facebook-auth` plugin is + enabled. \ No newline at end of file diff --git a/plugins/talk-plugin-featured-comments/README.md b/plugins/talk-plugin-featured-comments/README.md new file mode 100644 index 000000000..ed3529b9f --- /dev/null +++ b/plugins/talk-plugin-featured-comments/README.md @@ -0,0 +1,18 @@ +--- +title: talk-plugin-featured-comments +permalink: /plugin/talk-plugin-featured-comments/ +layout: plugin +plugin: + name: talk-plugin-featured-comments + provides: + - Server + - Client +--- + +Enables the ability for Moderators to feature and un-feature comments via the +Stream and the Admin. Featured comments show in a first-place tab on the Stream +if there are any featured comments on that story. + +When paired with the [talk-plugin-moderator-actions](/talk/plugin/talk-plugin-moderator-actions) +plugin, moderators will have the option of featuring comments from the comment +stream. \ No newline at end of file diff --git a/plugins/talk-plugin-flag-details/README.md b/plugins/talk-plugin-flag-details/README.md new file mode 100644 index 000000000..1d0e6b6bb --- /dev/null +++ b/plugins/talk-plugin-flag-details/README.md @@ -0,0 +1,12 @@ +--- +title: talk-plugin-flag-details +permalink: /plugin/talk-plugin-flag-details/ +layout: plugin +plugin: + name: talk-plugin-flag-details + provides: + - Client +--- + +Pluginizes the Flag Details area of comments in the Moderation Queues to display +data. Some basic details are already included on flags by default. \ No newline at end of file diff --git a/plugins/talk-plugin-google-auth/README.md b/plugins/talk-plugin-google-auth/README.md new file mode 100644 index 000000000..edf0b9488 --- /dev/null +++ b/plugins/talk-plugin-google-auth/README.md @@ -0,0 +1,29 @@ +--- +title: talk-plugin-google-auth +permalink: /plugin/talk-plugin-google-auth/ +layout: plugin +plugin: + name: talk-plugin-google-auth + depends: + - name: talk-plugin-auth + provides: + - Server + - Client +--- + +Enables sign-in via Facebook via the server side passport middleware. + +You will need to enable the Google+ API in the dashboard and create credentials +for a new OAuth client ID web application. The authorized JavaScript origin +should be set to the Talk domain, and the authorized redirect URI should be set +to http:///api/v1/auth/google/callback. This is only required while +the `talk-plugin-google-auth` plugin is enabled. + +Configuration: + +- `TALK_GOOGLE_CLIENT_ID` (**required**) - The Google OAuth2 client ID for your + Google login web app. You can learn more about getting a Google Client ID at + the [Google API Console](https://console.developers.google.com/apis/). +- `TALK_GOOGLE_CLIENT_SECRET` (**required**) - The Google OAuth2 client ID for + your Google login web app. You can learn more about getting a Google Client + ID at the [Google API Console](https://console.developers.google.com/apis/). \ No newline at end of file diff --git a/plugins/talk-plugin-ignore-user/README.md b/plugins/talk-plugin-ignore-user/README.md new file mode 100644 index 000000000..0d9786e3a --- /dev/null +++ b/plugins/talk-plugin-ignore-user/README.md @@ -0,0 +1,13 @@ +--- +title: talk-plugin-ignore-user +permalink: /plugin/talk-plugin-ignore-user/ +layout: plugin +plugin: + name: talk-plugin-ignore-user + provides: + - Client +--- + +Enables ability for users to ignore (or "mute") other users. If a user is +ignored, you will not see any of their comments. You can un-ignore a user via +the My Profile tab. \ No newline at end of file diff --git a/plugins/talk-plugin-like/README.md b/plugins/talk-plugin-like/README.md new file mode 100644 index 000000000..28cdd76f7 --- /dev/null +++ b/plugins/talk-plugin-like/README.md @@ -0,0 +1,12 @@ +--- +title: talk-plugin-like +permalink: /plugin/talk-plugin-like/ +layout: plugin +plugin: + name: talk-plugin-like + provides: + - Server + - Client +--- + +Enables a `like` reaction button. \ No newline at end of file diff --git a/plugins/talk-plugin-love/README.md b/plugins/talk-plugin-love/README.md new file mode 100644 index 000000000..3f8157f94 --- /dev/null +++ b/plugins/talk-plugin-love/README.md @@ -0,0 +1,12 @@ +--- +title: talk-plugin-love +permalink: /plugin/talk-plugin-love/ +layout: plugin +plugin: + name: talk-plugin-love + provides: + - Server + - Client +--- + +Enables a `love` reaction button. \ No newline at end of file diff --git a/plugins/talk-plugin-member-since/README.md b/plugins/talk-plugin-member-since/README.md new file mode 100644 index 000000000..cca30f2e1 --- /dev/null +++ b/plugins/talk-plugin-member-since/README.md @@ -0,0 +1,14 @@ +--- +title: talk-plugin-member-since +permalink: /plugin/talk-plugin-member-since/ +layout: plugin +plugin: + name: talk-plugin-member-since + depends: + - name: talk-plugin-author-menu + provides: + - Client +--- + +It will show the date that the member/user joined when you hover over the +username as retrieved from the `createdAt` time on the user. \ No newline at end of file diff --git a/plugins/talk-plugin-moderation-actions/README.md b/plugins/talk-plugin-moderation-actions/README.md new file mode 100644 index 000000000..b2818652d --- /dev/null +++ b/plugins/talk-plugin-moderation-actions/README.md @@ -0,0 +1,14 @@ +--- +title: talk-plugin-moderator-actions +permalink: /plugin/talk-plugin-moderator-actions/ +layout: plugin +plugin: + name: talk-plugin-moderator-actions + provides: + - Client +--- + +Enables in-stream moderation so that Moderators can reject, approve comments, +as well as ban users, directly from the comment stream. When +[talk-plugin-featured-comments](/talk/plugin/talk-plugin-featured-comments) is +enabled, it will also give the User's an option to feature from the stream. diff --git a/plugins/talk-plugin-notifications-category-featured/README.md b/plugins/talk-plugin-notifications-category-featured/README.md new file mode 100644 index 000000000..21dc4e4d6 --- /dev/null +++ b/plugins/talk-plugin-notifications-category-featured/README.md @@ -0,0 +1,17 @@ +--- +title: talk-plugin-notifications-category-featured +permalink: /plugin/talk-plugin-notifications-category-featured/ +layout: plugin +plugin: + name: talk-plugin-notifications-category-featured + depends: + - name: talk-plugin-notifications + - name: talk-plugin-featured-comments + provides: + - Server + - Client +--- + +When a comment is featured (via the +[talk-plugin-featured-comments](/talk/plugin/talk-plugin-featured-comments) +plugin), the user will receive a notification email. \ No newline at end of file diff --git a/plugins/talk-plugin-notifications-category-reply/README.md b/plugins/talk-plugin-notifications-category-reply/README.md new file mode 100644 index 000000000..968615d5a --- /dev/null +++ b/plugins/talk-plugin-notifications-category-reply/README.md @@ -0,0 +1,15 @@ +--- +title: talk-plugin-notifications-category-reply +permalink: /plugin/talk-plugin-notifications-category-reply/ +layout: plugin +plugin: + name: talk-plugin-notifications-category-reply + depends: + - name: talk-plugin-notifications + provides: + - Server + - Client +--- + +Replies made to each user will trigger an email to be sent with the notification +details if enabled. \ No newline at end of file diff --git a/plugins/talk-plugin-notifications-category-staff/README.md b/plugins/talk-plugin-notifications-category-staff/README.md new file mode 100644 index 000000000..b9db42641 --- /dev/null +++ b/plugins/talk-plugin-notifications-category-staff/README.md @@ -0,0 +1,15 @@ +--- +title: talk-plugin-notifications-category-staff +permalink: /plugin/talk-plugin-notifications-category-staff/ +layout: plugin +plugin: + name: talk-plugin-notifications-category-staff + depends: + - name: talk-plugin-notifications + provides: + - Server + - Client +--- + +Replies made to each user by a staff member will trigger an email to be sent +with the notification details if enabled. diff --git a/plugins/talk-plugin-notifications-digest-daily/README.md b/plugins/talk-plugin-notifications-digest-daily/README.md new file mode 100644 index 000000000..c0d2a210f --- /dev/null +++ b/plugins/talk-plugin-notifications-digest-daily/README.md @@ -0,0 +1,16 @@ +--- +title: talk-plugin-notifications-digest-daily +permalink: /plugin/talk-plugin-notifications-digest-daily/ +layout: plugin +plugin: + name: talk-plugin-notifications-digest-daily + depends: + - name: talk-plugin-notifications + provides: + - Server + - Client +--- + +Enables a digesting option for users to digest their notifications on an `DAILY` +basis, where the notification batching occurs every day at midnight in the +`America/New_York` timezone. \ No newline at end of file diff --git a/plugins/talk-plugin-notifications-digest-hourly/README.md b/plugins/talk-plugin-notifications-digest-hourly/README.md new file mode 100644 index 000000000..1a0c20f51 --- /dev/null +++ b/plugins/talk-plugin-notifications-digest-hourly/README.md @@ -0,0 +1,16 @@ +--- +title: talk-plugin-notifications-digest-hourly +permalink: /plugin/talk-plugin-notifications-digest-hourly/ +layout: plugin +plugin: + name: talk-plugin-notifications-digest-hourly + depends: + - name: talk-plugin-notifications + provides: + - Server + - Client +--- + +Enables a digesting option for users to digest their notifications on an `HOURLY` +basis, where the notification batching occurs every hour in the +`America/New_York` timezone. \ No newline at end of file diff --git a/plugins/talk-plugin-notifications/README.md b/plugins/talk-plugin-notifications/README.md new file mode 100644 index 000000000..0ce1b61a8 --- /dev/null +++ b/plugins/talk-plugin-notifications/README.md @@ -0,0 +1,21 @@ +--- +title: talk-plugin-notifications +permalink: /plugin/talk-plugin-notifications/ +layout: plugin +plugin: + name: talk-plugin-notifications + provides: + - Server + - Client +--- + +Enables the Notification system for sending out enabled email notifications to +users when they interact with Talk. By itself, this plugin will not send +anything. You need to enable one of the `talk-plugin-notifications-category-*` plugins. + +Configuration: + +- `DISABLE_REQUIRE_EMAIL_VERIFICATIONS` - When `TRUE`, it will disable the verification email check before sending notifications for those emails. **Note that organizations implementing a custom authentication system _must_ disable this feature, as they don't use our integrated auth**. (Default `FALSE`). + +You can enable other notification options by adding more +`talk-plugin-notification-*` plugins! \ No newline at end of file diff --git a/plugins/talk-plugin-offtopic/README.md b/plugins/talk-plugin-offtopic/README.md new file mode 100644 index 000000000..96fc1f8fd --- /dev/null +++ b/plugins/talk-plugin-offtopic/README.md @@ -0,0 +1,13 @@ +--- +title: talk-plugin-offtopic +permalink: /plugin/talk-plugin-offtopic/ +layout: plugin +plugin: + name: talk-plugin-offtopic + provides: + - Server + - Client +--- + +Allows the comment authors to tag their comment as `Off-Topic` which will add a +visible badge on the frontend to other users that their comment is off-topic. \ No newline at end of file diff --git a/plugins/talk-plugin-permalink/README.md b/plugins/talk-plugin-permalink/README.md new file mode 100644 index 000000000..e717ecd93 --- /dev/null +++ b/plugins/talk-plugin-permalink/README.md @@ -0,0 +1,12 @@ +--- +title: talk-plugin-permalink +permalink: /plugin/talk-plugin-permalink/ +layout: plugin +plugin: + name: talk-plugin-permalink + provides: + - Client +--- + +Enables a `Link` button that will provide a permalink to the comment that can be +shared with others. \ No newline at end of file diff --git a/plugins/talk-plugin-profile-settings/README.md b/plugins/talk-plugin-profile-settings/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/plugins/talk-plugin-remember-sort/README.md b/plugins/talk-plugin-remember-sort/README.md new file mode 100644 index 000000000..5147f9f2e --- /dev/null +++ b/plugins/talk-plugin-remember-sort/README.md @@ -0,0 +1,11 @@ +--- +title: talk-plugin-remember-sort +permalink: /plugin/talk-plugin-remember-sort/ +layout: plugin +plugin: + name: talk-plugin-remember-sort + provides: + - Client +--- + +Enables saving a user’s last sort selection as they browse other articles. \ No newline at end of file diff --git a/plugins/talk-plugin-respect/README.md b/plugins/talk-plugin-respect/README.md new file mode 100644 index 000000000..86327c6bb --- /dev/null +++ b/plugins/talk-plugin-respect/README.md @@ -0,0 +1,12 @@ +--- +title: talk-plugin-respect +permalink: /plugin/talk-plugin-respect/ +layout: plugin +plugin: + name: talk-plugin-respect + provides: + - Server + - Client +--- + +Enables a `respect` reaction button. \ No newline at end of file diff --git a/plugins/talk-plugin-rich-text-pell/README.md b/plugins/talk-plugin-rich-text-pell/README.md index 9ec28cd7c..da70d48d0 100644 --- a/plugins/talk-plugin-rich-text-pell/README.md +++ b/plugins/talk-plugin-rich-text-pell/README.md @@ -1,20 +1,49 @@ -# Talk Plugin Rich Text - Pell +--- +title: talk-plugin-rich-text-pell +permalink: /plugin/talk-plugin-rich-text-pell/ +layout: plugin +plugin: + name: talk-plugin-rich-text-pell + depends: + - name: talk-plugin-rich-text + provides: + - Client +--- + Enables rich text support client-side by using [Pell](https://github.com/jaredreich/pell). ## Installation -Add `talk-plugin-rich-text-pell` to the `plugins.json` in your Talk installation. Remember to add this in the `client` property since this plugin only covers the client side. To add server support, please use `talk-plugin-rich-text`. Ensure that you don't have any other plugins utilizing the `commentContent` slot, as it would result in duplicate comments. + +Add `"talk-plugin-rich-text-pell"` to the `plugins.json` in your Talk +installation. Remember to add this in the `client` property since this plugin +only covers the client side. To add server support, please use +[talk-plugin-rich-text](/talk/plugin/talk-plugin-rich-text). + +_Note: Ensure that you don't have any other plugins utilizing the +`commentContent` slot, as it would result in duplicate comments._ ## How does this work? + This plugin contains 2 important components: - - The Editor (`./components/Editor.js`) - - The Comment Content Renderer (`./components/CommentContent.js`) -The editor component contains the rich text editor. For this particular plugin we chose [Pell](https://github.com/jaredreich/pell). Pell is the simplest and smallest WYSIWYG text editor with no dependencies that we could find. +- The Editor (`./components/Editor.js`) +- The Comment Content Renderer (`./components/CommentContent.js`) -If you check our `index.js` you will notice that we inject this editor in the `commentBox` slot. We do this to replace the core comment box with this one. +The editor component contains the rich text editor. For this particular plugin +we chose [Pell](https://github.com/jaredreich/pell). Pell is the simplest and +smallest WYSIWYG text editor with no dependencies that we could find. -Now, in order to render the new styled comments we need a comment renderer. For this task we will have to replace our core comment renderer by using the `commentContent` slot. +If you check our `index.js` you will notice that we inject this editor in the +`commentBox` slot. We do this to replace the core comment box with this one. -If you are not familiar with GraphQL `client/index.js` will look complicated, but fear not! With those functions we specify what to expect from the server schema, how to perform optimistic updates and how keep the client store updated with the latest changes. +Now, in order to render the new styled comments we need a comment renderer. For +this task we will have to replace our core comment renderer by using the +`commentContent` slot. -We encourage you to see the files and check how easy is to build plugins! If you have any feedback, please let us know. +If you are not familiar with GraphQL `client/index.js` will look complicated, +but fear not! With those functions we specify what to expect from the server +schema, how to perform optimistic updates and how keep the client store updated +with the latest changes. + +We encourage you to see the files and check how easy is to build plugins! If you +have any feedback, please let us know. diff --git a/plugins/talk-plugin-rich-text/README.md b/plugins/talk-plugin-rich-text/README.md index ce85a23b0..109759274 100644 --- a/plugins/talk-plugin-rich-text/README.md +++ b/plugins/talk-plugin-rich-text/README.md @@ -1,24 +1,49 @@ -# Talk Plugin Rich Text +--- +title: talk-plugin-rich-text +permalink: /plugin/talk-plugin-rich-text/ +layout: plugin +plugin: + name: talk-plugin-rich-text + provides: + - Client +--- + Enables secure rich text support server-side. - ## Installation -Add `talk-plugin-rich-text` to the `plugins.json` in your Talk installation. Remember to add this in the `server` property since this plugin only covers the server side. To add frontend support consider using `talk-plugin-rich-text-pell`. + +Add `"talk-plugin-rich-text"` to the `plugins.json` in your Talk installation. +Remember to add this in the `server` property since this plugin only covers the +server side. To add frontend support consider using +[talk-plugin-rich-text-pell](/talk/plugin/talk-plugin-rich-text-pell). ## How does this work? -This plugin uses the `comment.metadata` field to store the `richTextBody`. By adding `richTextBody` to the schema we can later on resolve it as part of the comment. The original `comment.body` is never touched. Using the `metadata` field allow us to build plugins that are not invasive to the core and also test the capabilities of our plugin framework. We encourage you to see the files and check how easy is to build plugins! If you have any feedback, please let us know. + +This plugin uses the `comment.metadata` field to store the `richTextBody`. By +adding `richTextBody` to the schema we can later on resolve it as part of the +comment. The original `comment.body` is never touched. Using the `metadata` +field allow us to build plugins that are not invasive to the core and also test +the capabilities of our plugin framework. We encourage you to see the files and +check how easy is to build plugins! If you have any feedback, please let us +know. ## Configuration -There is a `config.js` in the root folder. This file contains the recommended settings. + +There is a `config.js` in the root folder. This file contains the recommended +settings. ### `highlightLinks` + A `boolean` to highlight links. Set it to `false` to turn it off. ### `linkify` + Settings for highlighting links. These will only apply if `higlightLinks` is set to `true`. ### `dompurify` + Rules to sanitize html input. We use [DOMPurify] (https://github.com/cure53/DOMPurify) to prevent web attacks and XSS. Here is the complete list of [settings] (https://github.com/cure53/DOMPurify) ## `jsdom` + In order to run html in the server we need [jsdom](https://github.com/jsdom/jsdom). Usually you wouldn’t need to modify this settings. diff --git a/plugins/talk-plugin-slack-notifications/README.md b/plugins/talk-plugin-slack-notifications/README.md new file mode 100644 index 000000000..a9a192664 --- /dev/null +++ b/plugins/talk-plugin-slack-notifications/README.md @@ -0,0 +1,24 @@ +--- +title: talk-plugin-slack-notifications +permalink: /plugin/talk-plugin-slack-notifications/ +layout: plugin +plugin: + name: talk-plugin-slack-notifications + provides: + - Server +--- + +Enables all new comments that are written to be posted to a Slack channel as +well. Configure an +[Incoming Webhook](https://api.slack.com/incoming-webhooks) +app and provide that url in the form of the `SLACK_WEBHOOK_URL` +detailed below. + +*Warning: On high volume sites, this means every single comment will flow into +Slack, if this isn't what you want, be sure to use the provided plugin as a +recipe to further customize the behavior*. + +Configuration: + +- `SLACK_WEBHOOK_URL` (**required**) - The webhook url that will be + used to post new comments to. \ No newline at end of file diff --git a/plugins/talk-plugin-sort-most-liked/README.md b/plugins/talk-plugin-sort-most-liked/README.md new file mode 100644 index 000000000..fbb22678b --- /dev/null +++ b/plugins/talk-plugin-sort-most-liked/README.md @@ -0,0 +1,15 @@ +--- +title: talk-plugin-sort-most-liked +permalink: /plugin/talk-plugin-sort-most-liked/ +layout: plugin +plugin: + name: talk-plugin-sort-most-liked + depends: + - name: talk-plugin-like + - name: talk-plugin-viewing-options + provides: + - Server + - Client +--- + +Provides a sort for the comments with the most `like` reactions first. \ No newline at end of file diff --git a/plugins/talk-plugin-sort-most-loved/README.md b/plugins/talk-plugin-sort-most-loved/README.md new file mode 100644 index 000000000..d09855288 --- /dev/null +++ b/plugins/talk-plugin-sort-most-loved/README.md @@ -0,0 +1,15 @@ +--- +title: talk-plugin-sort-most-loved +permalink: /plugin/talk-plugin-sort-most-loved/ +layout: plugin +plugin: + name: talk-plugin-sort-most-loved + depends: + - name: talk-plugin-love + - name: talk-plugin-viewing-options + provides: + - Server + - Client +--- + +Provides a sort for the comments with the most `love` reactions first. \ No newline at end of file diff --git a/plugins/talk-plugin-sort-most-replied/README.md b/plugins/talk-plugin-sort-most-replied/README.md new file mode 100644 index 000000000..b7861593a --- /dev/null +++ b/plugins/talk-plugin-sort-most-replied/README.md @@ -0,0 +1,14 @@ +--- +title: talk-plugin-sort-most-replied +permalink: /plugin/talk-plugin-sort-most-replied/ +layout: plugin +plugin: + name: talk-plugin-sort-most-replied + depends: + - name: talk-plugin-viewing-options + provides: + - Server + - Client +--- + +Provides a sort for the comments with the most replies first. \ No newline at end of file diff --git a/plugins/talk-plugin-sort-most-respected/README.md b/plugins/talk-plugin-sort-most-respected/README.md new file mode 100644 index 000000000..29e822400 --- /dev/null +++ b/plugins/talk-plugin-sort-most-respected/README.md @@ -0,0 +1,15 @@ +--- +title: talk-plugin-sort-most-respected +permalink: /plugin/talk-plugin-sort-most-respected/ +layout: plugin +plugin: + name: talk-plugin-sort-most-respected + depends: + - name: talk-plugin-respect + - name: talk-plugin-viewing-options + provides: + - Server + - Client +--- + +Provides a sort for the comments with the most `respect` reactions first. \ No newline at end of file diff --git a/plugins/talk-plugin-sort-newest/README.md b/plugins/talk-plugin-sort-newest/README.md new file mode 100644 index 000000000..57d3fd66d --- /dev/null +++ b/plugins/talk-plugin-sort-newest/README.md @@ -0,0 +1,14 @@ +--- +title: talk-plugin-sort-newest +permalink: /plugin/talk-plugin-sort-newest/ +layout: plugin +plugin: + name: talk-plugin-sort-newest + depends: + - name: talk-plugin-viewing-options + provides: + - Server + - Client +--- + +Provides a sort for the newest comments first. \ No newline at end of file diff --git a/plugins/talk-plugin-sort-oldest/README.md b/plugins/talk-plugin-sort-oldest/README.md new file mode 100644 index 000000000..3972faf7a --- /dev/null +++ b/plugins/talk-plugin-sort-oldest/README.md @@ -0,0 +1,14 @@ +--- +title: talk-plugin-sort-oldest +permalink: /plugin/talk-plugin-sort-oldest/ +layout: plugin +plugin: + name: talk-plugin-sort-oldest + depends: + - name: talk-plugin-viewing-options + provides: + - Server + - Client +--- + +Provides a sort for the oldest comments first. \ No newline at end of file diff --git a/plugins/talk-plugin-subscriber/README.md b/plugins/talk-plugin-subscriber/README.md new file mode 100644 index 000000000..28c38ec32 --- /dev/null +++ b/plugins/talk-plugin-subscriber/README.md @@ -0,0 +1,14 @@ +--- +title: talk-plugin-subscriber +permalink: /plugin/talk-plugin-subscriber/ +layout: plugin +plugin: + name: talk-plugin-subscriber + provides: + - Server + - Client +--- + +Enables a `Subscriber` badge to be added to comments where the author has the +`SUBSCRIBER` tag. This must match with a custom auth integration that adds the +tag to the users that are subscribed to the service. diff --git a/plugins/talk-plugin-toxic-comments/README.md b/plugins/talk-plugin-toxic-comments/README.md new file mode 100644 index 000000000..efd5f550a --- /dev/null +++ b/plugins/talk-plugin-toxic-comments/README.md @@ -0,0 +1,28 @@ +--- +title: talk-plugin-toxic-comments +permalink: /plugin/talk-plugin-toxic-comments/ +layout: plugin +plugin: + name: talk-plugin-toxic-comments + provides: + - Server + - Client +--- + +Using the [Perspective API](http://perspectiveapi.com/), this +plugin will warn users and reject comments that exceed the predefined toxicity +threshold. For more information on what Toxic Comments are, check out the +[Toxic Comments](./toxic-comments/) documentation. + +Configuration: + +- `TALK_PERSPECTIVE_API_KEY` (**required**) - The API Key for Perspective. You + can register and get your own key at [http://perspectiveapi.com/](http://perspectiveapi.com/). +- `TALK_TOXICITY_THRESHOLD` - If the comments toxicity exceeds this threshold, + the comment will be rejected. (Default `0.8`) +- `TALK_PERSPECTIVE_API_ENDPOINT` - API Endpoint for hitting the + perspective API. (Default `https://commentanalyzer.googleapis.com/v1alpha1`) +- `TALK_PERSPECTIVE_TIMEOUT` - The timeout for sending a comment to + be processed before it will skip the toxicity analysis, parsed by + [ms](https://www.npmjs.com/package/ms). (Default `300ms`) +- `TALK_PERSPECTIVE_DO_NOT_STORE` - Whether the API is permitted to store comment and context from this request. Stored comments will be used for future research and community model building purposes to improve the API over time. (Default `true`) [Perspective API - Analize Comment Request](https://github.com/conversationai/perspectiveapi/blob/master/api_reference.md#analyzecomment-request) \ No newline at end of file diff --git a/plugins/talk-plugin-viewing-options/README.md b/plugins/talk-plugin-viewing-options/README.md new file mode 100644 index 000000000..eb83cc0a5 --- /dev/null +++ b/plugins/talk-plugin-viewing-options/README.md @@ -0,0 +1,11 @@ +--- +title: talk-plugin-viewing-options +permalink: /plugin/talk-plugin-viewing-options/ +layout: plugin +plugin: + name: talk-plugin-viewing-options + provides: + - Client +--- + +Pluginizes the sorting/viewing options for a comment stream. diff --git a/yarn.lock b/yarn.lock index d0de27bf6..10c0497a2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6817,6 +6817,10 @@ lru-cache@^4.0.1, lru-cache@^4.1.1: pseudomap "^1.0.2" yallist "^2.1.2" +lunr@^2.1.6: + version "2.1.6" + resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.1.6.tgz#671d2321c4c5bc4c522914953d1c54d612f60aa7" + macaddress@^0.2.8: version "0.2.8" resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" @@ -7149,7 +7153,7 @@ mocha@^3.1.2: mkdirp "0.5.1" supports-color "3.1.2" -moment-timezone@^0.5.14: +moment-timezone@^0.5.14, moment-timezone@^0.5.x: version "0.5.14" resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.14.tgz#4eb38ff9538b80108ba467a458f3ed4268ccfcb1" dependencies: