diff --git a/docs/_config.yml b/docs/_config.yml index 527782bb3..8ea3f2857 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -86,14 +86,24 @@ sidebar: url: / - title: Configuration url: /v5/configuration/ + - title: Admin Settings + url: /v5/administration/ - title: Developing url: /v5/developing/ + - title: CLI Tools + url: /v5/configuration-cli-tools/ - title: Integration children: - title: CMS Integration url: /v5/integrating/cms/ - title: Single Sign On url: /v5/integrating/sso/ + - title: Social and Email Authentication + url: /v5/integration/auth/ + - title: Custom CSS Styles + url: /v5/css/ + - title: Emails & Notifications + url: /v5/notifications/ - title: GDPR url: /v5/integrating/gdpr/ - title: Comment Count @@ -196,7 +206,9 @@ sidebar: url: /when-youve-installed-talk/ - title: Embedding Talk in Native Mobile Apps url: /embedding-in-native-mobile-apps/ - - title: Migrating + - title: Migrating + children: + - title: children: - title: Migrating from v3.x.x url: /migration/3/ @@ -204,14 +216,17 @@ sidebar: url: /migration/4/ - title: Migrating to v4.1.0 url: /migration/4.1/ - - title: FAQ & Troubleshooting - children: + - title: Migrating to v5.0.0 + url: /migration/5.0/ + - title: FAQ & Troubleshooting + children: + - children: - title: FAQ url: /faq/ - title: Troubleshooting Tips url: /troubleshooting-tips/ - - title: Contact - url: /contact/ + - title: Contact + url: /contact/ marked: gfm: true diff --git a/docs/source/06-01-migrating-5.md b/docs/source/06-01-migrating-5.md new file mode 100644 index 000000000..632dfb53f --- /dev/null +++ b/docs/source/06-01-migrating-5.md @@ -0,0 +1,32 @@ +--- +title: Migrating to v5 +permalink: /migration/5.0/ +--- + +## **⏰It is currently not possible to upgrade directly from 4.x.x versions to version 5.x** ⏰ + +**Trying will break your install of Coral!** + +Coral version 5.0.0 is more than just a version bump, it includes a fundamental rewrite of underlying core components, changes to the database schema, and the introduction of Typescript strong data types. This means migrating is a bit more complicated than running a simple database migration. + +### Migration Path +A step by step migration path is currently in development, and we will be announcing it here once it’s ready. + +The process for migration will include: +* Create a mongodump export of your 4.x.x database +* Use an import tool to transform the data for v5, and import it to a new mongo database +* Deploy & configure v5 on your production infrastructure (pointing to new DB) +* Update your embed script to the new version + +Downtime will be required to complete the migration, and you should carefully plan your migration accordingly depending on your infrastructure setup, and amount of data to be migrated. + +### Migrating Plugins +Plugins are no longer supported and will not work with any instance of Coral >= v5. Most of the optional `talk-plugin` features have been built right into core so you no longer need install, manage, and worry about plugins. If you were using plugins to achieve custom functionality, please contact us to learn about some of the new ways to solve custom use cases in v5 and beyond. + + +### Supporting your Migration +We would love to help! + +If you’re currently running any open source version 4.x.x and would like assistance with planning and/or executing a migration please reach out to us at support@coralproject.net. + +We can help you figure out the best path forward, and give you early access to the migration tools we’re working on. diff --git a/docs/source/07-01-faq.md b/docs/source/07-01-faq.md index f7dfa0e6f..7e3e243da 100644 --- a/docs/source/07-01-faq.md +++ b/docs/source/07-01-faq.md @@ -11,57 +11,62 @@ To log a bug or request a feature, submit a Support ticket ([support@coralprojec You can also request help on Github by [submitting an issue](https://github.com/coralproject/talk/issues). This also increases your chances of having someone from the community respond to help. -## How can our dev team contribute to Talk? +## How can our dev team contribute to Coral? We are lucky to work with newsroom dev teams and individual contributors who span the world, and come from newsrooms of all sizes. You can read our [Contribution Guide](https://github.com/coralproject/talk/blob/master/CONTRIBUTING.md) to get started, but feel free to reach out to us via Github too. ## What if we want to add a feature you don't have? -Talk is open source, so you're free to develop additional functionality and [submit a pull request](https://github.com/coralproject.net/talk). +Coral is open source, so you're free to develop additional functionality and [submit a pull request](https://github.com/coralproject.net/talk). ## Do you have GDPR features? -Yes! Please read our [GDPR documentation](/talk/integrating/gdpr/) for more information and instructions to get started. +Yes! Please read our GDPR documentation for your version for more information and instructions to get started. +* [version 4.x.x](/talk/integrating/gdpr/) +* [version 5.x.x](/talk/v5/integrating/gdpr/) ## Can I import my existing comments? -Yes! We have a community-supported [import framework](https://github.com/coralproject/talk-importer) that you can use to migrate your existing comments. +Yes! For version 4.x.x we have a community-supported [import framework](https://github.com/coralproject/talk-importer) that you can use to migrate your existing comments. + +Import tools are still in development for version 5, but will be coming soon! Contact us at [support@coralproject.net](mailto:support@coralproject.net) if you need an importer for version 5.x.x. ## What support is available? -Our team is small, so it's difficult for us to provide support packages. However, you can always email us at [support@coralproject.net](mailto:support@coralproject.net), and we can help answer your questions. In some cases, we can provide premium support packages either with our team, or through partners. You can inquire about this via the support email address above. +You can always email us at [support@coralproject.net](mailto:support@coralproject.net), and if we are able to help we will answer your questions. In some cases, we are able to offer paid support packages. You can inquire about this via the support email address above. ## Is there a hosted version I can purchase by monthly subscription? Yes! [Visit our hosting page](https://coralproject.net/pricing/) to submit information and receive a quote. -## Where is our data when we use Talk? +## Where is our data when we use Coral? -If you are hosting Talk on your own: +If you are hosting Coral on your own: * Your data is stored in a MongoDB database that you provide * The Coral team doesn’t have any access to your data -If you are using our Hosted SaaS version of Talk: +If you are using our Hosted SaaS version of Coral: -* Your data is stored in a dedicated MongoDB database that is provisioned for you -* Your data is completely isolated from other customers' data +* Your data is stored in a MongoDB cluster that is provisioned for your instance +* Your data is logically isolated from other customers' data * The Coral Team and its third-party database hosting providers use strict access controls and auditing to protected your data from unauthorized access -## Does Talk have any automated moderation features to protect against spam and trolling? +## Does Coral have any automated moderation features to protect against spam and trolling? -As well as basic word/phrase filtering and user reputation scores, Talk offers optional advanced features via third-party services: +As well as basic word/phrase filtering and user recent history scores, Coral offers optional advanced features via third-party services: -* The [Toxic Comments plugin](/talk/plugin/talk-plugin-toxic-comments) integrates with the [Perspective API from Google](https://www.perspectiveapi.com/) to detect the likelihood of toxicity of comments in real-time -* The [Akismet plugin](/talk/plugin/talk-plugin-akismet) detects and blocks spam comments +* The [Toxic Comments filter](/talk/v5/administration/#toxic-comment-filter) integrates with the [Perspective API from Google](https://www.perspectiveapi.com/) to detect the likelihood of toxicity of comments in real-time +* The [Akismet Spam filter](/talk/v5/administration/#spam-detection-filter) detects and blocks spam comments -## How much can I customize Talk? +## How much can I customize Coral? -* The CSS of the Talk comment stream can be customized by [adding your own CSS via an external stylesheet](/talk/integrating/styling-css/) -* The functionality of Talk can be [extended through the plugin framework](/talk/plugins/) +The CSS of the embedded comment stream can be customized by adding your own CSS via an external stylesheet. See the doc's for your version: +* [version 4.x.x](/talk/integrating/styling-css/) +* [version 5.x.x](/talk/v5/css/) -## How much does Talk cost? +## How much does Coral cost? -* The Talk software is freely available under the Apache 2.0 open source license -* Associated costs are those for the infrastructure required to run Talk (i.e. cloud hosting fee or bare-metal server costs) -* The Coral Project offers a SaaS/hosted version of Talk. Please [get in touch with us](https://coralproject.net/pricing/) to discuss pricing for your requirements. +* The Coral software is freely available under the Apache 2.0 open source license +* Associated costs are those for the infrastructure required to run Coral (i.e. cloud hosting fee or bare-metal server costs) +* The Coral Project offers a SaaS/hosted version of Coral. Please [get in touch with us](https://coralproject.net/pricing/) to discuss pricing for your requirements. diff --git a/docs/source/07-02-troubleshooting-tips.md b/docs/source/07-02-troubleshooting-tips.md index 0b4a7a682..419b70a6d 100644 --- a/docs/source/07-02-troubleshooting-tips.md +++ b/docs/source/07-02-troubleshooting-tips.md @@ -5,11 +5,13 @@ permalink: /troubleshooting-tips/ ## How do I find out what version I'm running? -If you visit https:///api/v1, it will return the version you're running and the hash for the latest commit. +If you visit one of the following endpionts, Coral will return the version you're running and the hash for the latest commit. +* `/api/v1` (works for 4.x.x versions) +* `/api/version` (works for 5.x.x versions) -## I've installed Talk but I can't see the comment stream appear on my articles +## I've installed Coral but I can't see the comment stream appear on my articles -* Make sure you've adding the correct domains to your Permitted Domains in Configure > Tech Settings +* Make sure you've adding the correct domains to your Permitted Domains * Make sure you've correctly added the embed via your CMS to your article pages * Check the console for any errors and you can file a bug via [support](mailto:support@coralproject.net) if you can't resolve the issue @@ -21,23 +23,17 @@ If you visit https:///api/v1, it will return the version you * You could also try asking them to clear their browser cache -## My commenters are reporting that they cannot login to Talk +## My commenters are reporting that they cannot login to Coral -If you're using your own custom auth plugin: +This depends greatly on what version of Coral you are using and which authentication strategies you've enabled. Some things to check are: -* Review the code and your server logs to ensure your plugin is working correctly. Check [our auth docs](/talk/integrating/authentication/) for more tips. -* Ensure that your JWT token settings, especially expiry, is being set correctly. You can troubleshoot JWT related issues with the [JWT Debugger](https://jwt.io/). +* If using 4.x.x, review your `plugins.json` and server logs to ensure your auth plugins are enabled and working correctly. Check [our auth docs](/talk/integrating/authentication/) for more tips. +* If using SSO, ensure that your JWT token settings, especially expiry, is being set correctly. You can troubleshoot JWT related issues with the [JWT Debugger](https://jwt.io/). * See if you can isolate if it's a particular group of users that are experiencing this issue, e.g. mods, admins, subscribers? Confirm they have the appropriate permissions to comment. -* Note if this is a new issue that happened after an upgrade - did you read the [migration docs](/talk/migration/3/) and the [release notes](https://github.com/coralproject/talk/releases)? This might help you resolve the issue +* Note if this is a new issue that happened after an upgrade - did you read the [release notes](https://github.com/coralproject/talk/releases) and confirm that any required manual or automatic database migrations run? * Confirm that users who are affected have the correct `username.status`. If users have status `UNSET`, this is related to a bug with upgrading from 3.x to 4.x that has affected some organizations. Read more here about [upgrading from 3.x to 4.x](/talk/migration/3/). * If you're still experiencing issues, log a [support ticket](mailto:support@coralproject.net) so we can help diagnose the issue -If you're using `talk-plugin-auth`: - -* See if you can isolate if it's a particular group of users that are experiencing this issue, e.g. mods, admins, subscribers? Confirm they have the appropriate permissions to comment. -* Note if this is a new issue that happened after an upgrade - did you read the [migration docs](/talk/migration/3/) and the [release notes](https://github.com/coralproject/talk/releases)? This might help you resolve the issue. -* If you're still experiencing issues, log a [support ticket](mailto:support@coralproject.net) so we can help diagnose the issue - If a user has been locked out due to too many failed login attempts: * How long does the user have to wait before they will be allowed to login? 10 mins \ No newline at end of file diff --git a/docs/source/contact.md b/docs/source/contact.md index eba8e08c1..781d80339 100644 --- a/docs/source/contact.md +++ b/docs/source/contact.md @@ -3,10 +3,10 @@ title: Contact permalink: /contact/ --- -## How can I get help integrating Talk into my newsroom? +## How can I get help integrating Coral into my newsroom? + +We're here to help with newsrooms of all sizes. Connect with us [here](https://coralproject.net/contact/) to see how we can help you! -We're here to help with newsrooms of all sizes. Email our Support Team -([support@coralproject.net](mailto:support@coralproject.net)) to set up a meeting. ## How do I request a feature or submit a bug? diff --git a/docs/source/integrating/version-5-auth.md b/docs/source/integrating/version-5-auth.md new file mode 100644 index 000000000..3dd3ec913 --- /dev/null +++ b/docs/source/integrating/version-5-auth.md @@ -0,0 +1,57 @@ +--- +title: Social and Email Authentication +permalink: /v5/integration/auth/ +--- + +## Authentication Strategies + +There are several strategies to choose from when it comes to user authentication. Login methods can be enabled or disabled for both the **Coral Admin** and the **Comment Stream** separately thus allowing you to use different methods for different user groups. + +You can also use "Allow Registration" to restrict or allow users that have not signed up before to register and create new user accounts. + +To configure authentication for your instance of Coral, go to **Configure** > **Authentication**. + +## Login with email authentication +Best when you want Coral to manage all user registration, creation and authentication. Requires the least amount of setup and configuration. Users register by creating a Username (must be unique across users, no spaces or special chars), Email, and Password. All user details are stored in Coral's database. + +By Default - users are sent a verification email and are prompted to verify email addresss, however completing the email verification step is not required to submit comments. + + +## Login with OpenID Connect + +Allows integration with your existing OpenID Connect authentication provider. When enabled this strategy adds a "Login with ___", button to Coral's login modal with the value you've specified for `Provider Name`. + +With OpenID Connect authentication is handled by passing an access token parameter to the comment stream embed when placing the call to render it. To learn more please visit: https://openid.net/connect/ + +## Login with Single Sign On + +When you want users to authenticate via your existing identity system, and be automatically registered/logged into Coral. Users register, login, and manage their user details on your existing site, your user database maintains the source of truth for all user information. Users are created and updated in Coral via jwt tokens passed from your auth service to Coral. + +Requires advanced configuration, please see: [Single Sign On](/talk/v5/integrating/sso/) + +## Login with Google & Facebook +Allows users to use existing social media account to sign in. Requires you to setup API keys with social sign on provider, and configure your API keys in Coral. + +Users register and login via a *“Sign in with ….”*, and are not required to set a password if Email based authentication is not enabled. Users with social accounts are prompted to associate an email address with their social profile to enable notifications. + + +## Commenter Account Management Features + +Optional features you can enable or disable to allows users to: +* change their usernames (once every 14 days) +* download their comments +* delete their account details. + +## Session settings + +Determines length of user sessions when not using SSO or when `exp` claim is not provided on jwt. Default: `90 Days`. + +## Username Restrictions + +Coral usernames are subject to the following validations: +* USERNAME_REGEX = +`(/^[a-zA-Z0-9_.]+$/)` +* USERNAME_MAX_LENGTH = `30` +* USERNAME_MIN_LENGTH = `3` + +*NOTE: SSO users are not subject to username restricitons* diff --git a/docs/source/integrating/version-5-css.md b/docs/source/integrating/version-5-css.md new file mode 100644 index 000000000..190364029 --- /dev/null +++ b/docs/source/integrating/version-5-css.md @@ -0,0 +1,12 @@ +--- +title: Customizing Styles with CSS +permalink: /v5/css/ +--- + +You can add your own stylesheet in **Admin** > **Configure** > **Advanced** > **Custom CSS**. + +If you would like to change the styling of any elements of the comment embed, we provide global classnames. Most elements will be tagged with either `.coral` or `.coral-stream`. + +The easiest way to find the classname for the element you're looking for is to use the web inspector, and then update your stylesheet accordingly. + +You can also navigate to https://github.com/coralproject/talk/blob/master/src/core/client/stream/classes.ts to see available stable class names. diff --git a/docs/source/version-5-administration.md b/docs/source/version-5-administration.md new file mode 100644 index 000000000..c7aecacb2 --- /dev/null +++ b/docs/source/version-5-administration.md @@ -0,0 +1,138 @@ +--- +title: Admin Settings +permalink: /v5/administration/ +--- + +Upon completing the installation setup wizard, you will be able to login to Coral with the ADMIN user you created during setup. + +Users who login with the ADMIN role are able to access the Configure tab, and from here change settings that control the functionality of your Coral instance. + +## General + +### Language +You can set the default language Coral uses in **Admin** > **Configure** > **General**. + +You can see what languages Coral currently supports here: https://github.com/coralproject/talk/tree/master/src/locales + +### Comment Stream Settings + +Also located in **Admin** > **Configure** > **General** are the setting to control the comment stream. These settings are site-wide and will affect all of your comment streams. + +#### **Community guidelines summary** +This will appear above the comments sitewide. You can format the text using Markdown. + +#### **Sitewide closed comments message** +A message that will be displayed when comment streams are closed sitewide. + +#### **Comment length** +Set minimum and maximum comment length requirements. Blank spaces at the beginning and the end of a comment will be trimmed. Some newsrooms we’ve worked with prefer a limit between 2000 and 5000 +characters. Commenters will be alerted that they have gone over that number and won’t be able to submit their comment until they’ve edited it. This can be a useful tool to ensure commenters are concise with their comments. + +#### **Comment editing** +Set a limit on how long commenters have to edit their comments sitewide. Edited comments are marked as (Edited) on the comment stream and the moderation panel. + +#### **Closing comment streams** +Set comment streams to close after a defined period of time after a story’s publication + +#### **Closed comment stream message** +A message to appear when a story is closed for commenting. + +### Reactions +Coral comes with a `Respect` button out of the box. Why a “Respect” button, you +ask? +[Read more here](https://mediaengagement.org/research/engagement-buttons/). + +You can also create your own custom reaction +buttons by modifying the Reaction label. + +### Badges & Staff Member Badge + +Badges differentiate users on the comment stream. By default, the `Staff` user badge displays when a commenter has an Admin, Moderator, or Staff role. + +You can customize the badge label used for Staff roles by providing your own custom badge text. *i.e.: "NewsSite Team"* + +Custom user badges are also available with SSO integrations. See [Single Sign On](/talk/v5/integrating/sso/) + + +## Moderation +These options can be found under **Admin** > **Configure** > **Moderation**. + +### Pre-moderation +When pre-moderation is turned on, comments will not be published unless approved by a moderator. + +### Recent History +Prevents repeat offenders from publishing comments without approval. When a commenter's rejection rate is above the threshold, their comments are sent to the Pending queue for moderation. This does not apply to Staff comments. + +Rejection rate time period determines the look back period of commenter activity that will be considered in performing the calculation. + +Rejection rate threshold is calculated by dividing +number of Rejected comments by (rejected comments + published comments) over the time period specified, and is displayed as a percentage. It does not include comments pending for toxicity, spam or pre-moderation, only moderated comments are considred. + +### Toxic Comment Filter + +Using Google's Perspective API, the Toxic Comment Filter warns users when comments exceed the predefined toxicity threshold. You can read more about Google’s Perspective API and/or request an API key here: http://perspectiveapi.com/. + +Comments with a toxicity score above the threshold will not be published and are placed in the Pending Queue for review by a moderator. Only if approved by a moderator, then the comment will be published. + +If a comment exceeds the threshold, the commenter is warned that their comment may be toxic, and are given the chance to modify their comment before posting. If the revised comment is below the Toxicity Threshold, it is posted and displayed normally; however if the revised comment still exceeds the Toxicity Threshold, it is not displayed on the stream and instead is sent to the Pending queue for moderation. + +Perspective API uses machine learning based on existing databases of accepted/rejected comments to guess the probability that a comment is abusive and/or toxic. English is the default language, but experimental models are available in multiple languages. Sites can also work with Jigsaw to create an individualized data set specifically trained on their own comment history. Read more about Coral’s take on toxicity [on our blog](https://coralproject.net/blog/toxic-avenging/). + +### Spam Detection Filter + +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 is a premium service, charges may apply.* + +## Banned & Suspect Words and Phrases +Located in **Admin** > **Configure** > **Banned words and phrases**. + +**Banned words** are a list of words or phrases that will trigger a comment to be automatically **Rejected**. + +Comments containing a word or phrase in the **Suspect Words** List are placed into the **Reported** queue for moderator review and are published (if comments are not pre-moderated). + +Lists of words/phrases are not case sensitive, and are separated by new lines. + + +## Email SMTP Settings +These settings can be found under **Admin** > **Configure** > **Email**. + +You can configure a **From Name** as well as a **From Email Address** to appear on all outgoing emails. + +Coral will use your SMTP provider for all outgoing mail including user invites, email verifications, password resets, and notifications. Specify your SMTP provider's settings for Host, Port, and authentication to send emails from Coral. + +The `Invite` (users) button on the Community tab will only be available if Email settings have been configured. + +## Advanced +Located in **Admin** > **Configure** > **Advanced**. + +### Embed Code +This is the unique script that is used to embed Coral comment streams on your website. For more information about using your Embed code see [CMS Integration](/talk/v5/integrating/cms/). + +### Custom CSS +The link to your custom stylesheet. This will override any default styles, so you can style the comment embed to match your site. + +### Live Updates +When enabled, there will be real-time loading and updating of comments via subscriptions +(specifically GraphQL Subscriptions). When disabled, users will have to refresh the page to see new comments. + +Coral enables this via “Load More” buttons for both top-level comments (this +button appears at the top of the stream), and within conversation threads (this +button appears in situ for replies). + +We’ve decided to go this route in order to make the viewing experience as smooth +as possible, so that the feed of comments doesn’t change as you’re reading just +because new comments are coming in. This could be especially disruptive on +breaking news and/or controversial stories with very active discussions. + +This option can be disabled by setting the environment variable: [DISABLE_LIVE_UPDATES](/talk/v5/configuration/#disable-live-updates) + + +### Permitted Domains + +List of domains where your Coral instance is allowed to be embedded. List each domain and subdomain in use separately and include the scheme for example: `http://localhost:3000`, `https://staging.yourdomain.com`, `http://yourdomain.com`, `https://yourdomain.com`, etc. + +### Story Creation Settings +Advanced settings for how stories are created within Coral; such as if stories are to be automatically created when they are published from your CMS. + +See CMS Integration secions [Story Creation](/talk/v5/integrating/cms/#story-creation) and [Story Scraping](/talk/v5/integrating/cms/#story-scraping) for more details. diff --git a/docs/source/version-5-cli.md b/docs/source/version-5-cli.md new file mode 100644 index 000000000..73c494543 --- /dev/null +++ b/docs/source/version-5-cli.md @@ -0,0 +1,230 @@ +--- +title: Configuration with CLI tools in Version 5 +permalink: /v5/configuration-cli-tools/ +toc: true +--- + +Coral’s CLI tooling has been reinvented in version 5. We’ve replaced the former `./bin/cli` tools with a completely new CLI application which is available on GitHub at: https://github.com/coralproject/coral-cli + +The new CLI was built on `oclif` ([View on GitHub](https://github.com/oclif)), the open source CLI Framework originally built by Heroku, and offers an extensible platform for interacting with Coral via CLI. + + +## Installation + +To get started with the new CLI run: +``` +npm install -g @coralproject/coral-cli +``` + + +## Usage + +Once installed, run: +``` +coral-cli [COMMAND] +``` + Below is a list of commands available: +``` +CLI to interact with Coral + +VERSION + @coralproject/coral-cli/0.2.0 darwin-x64 node-v11.9.0 + +USAGE + $ coral-cli [COMMAND] + +COMMANDS + help display help for coral-cli + login grabs a token for interacting with Coral + logout removes credentials for logging in with Coral + plugins list installed plugins + story manage stories on Coral + tenant creates a new tenant + token creates tokens on the current user +``` + +### `coral-cli help [COMMAND]` +Displays help for `coral-cli`, or for the command specified. +``` +USAGE + $ coral-cli help [COMMAND] + +ARGUMENTS + COMMAND command to show help for + +OPTIONS + --all see all commands in CLI +``` + +### `coral-cli login` +Grabs a session token for interacting with a specific Coral installation. Can be used to create a session prior to running other commands. +``` +USAGE + $ coral-cli login + +OPTIONS + -d, --domain=domain (required) domain for tenant to run command against +``` + +### `coral-cli logout` +Removes credentials for logging in with Coral and terminates current login session. +``` +USAGE + $ coral-cli logout + +OPTIONS + -d, --domain=domain (required) domain for tenant to run command against +``` + +### `coral-cli plugins` +Not to be confused with "Talk Plugins" that were available in prior versions of Coral, `coral-cli plugins` are extensions to the `coral-cli` application. See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins). Use this command to the list installed plugins. + +``` +USAGE + $ coral-cli plugins + +OPTIONS + --core show core plugins + +EXAMPLE + $ coral-cli plugins +``` + +### `coral-cli plugins:install [PLUGIN]` +Installs a plugin into the CLI. Can be from npm or a git url. See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins) + +*NOTE: Installation of a user-installed plugin will override a core plugin. e.g. If you have a core plugin that has a `hello` command, installing a user-installed plugin with a `hello` command will override the core plugin implementation.* +```bash +USAGE + $ coral-cli plugins:install PLUGIN + +ARGUMENTS + PLUGIN plugin to install + +OPTIONS + -f, --force yarn install with force flag + -h, --help show CLI help + -v, --verbose + +ALIASES + $ coral-cli plugins:add + +EXAMPLES + $ coral-cli plugins:install myplugin + $ coral-cli plugins:install https://github.com/someuser/someplugin + $ coral-cli plugins:install someuser/someplugin +``` + +### `coral-cli plugins:link PLUGIN` +Links a plugin into the CLI for development. +See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins) +``` +USAGE + $ coral-cli plugins:link PLUGIN + +ARGUMENTS + PATH [default: .] path to plugin + +OPTIONS + -h, --help show CLI help + -v, --verbose + +EXAMPLE + $ coral-cli plugins:link myplugin + ``` + +### `coral-cli plugins:uninstall PLUGIN` +Removes a plugin from the CLI. See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins) +``` +USAGE + $ coral-cli plugins:uninstall PLUGIN + +ARGUMENTS + PLUGIN plugin to uninstall + +OPTIONS + -h, --help show CLI help + -v, --verbose + +ALIASES + $ coral-cli plugins:unlink + $ coral-cli plugins:remove +``` + +### `coral-cli plugins:update` +Update installed plugins. See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins). +``` +USAGE + $ coral-cli plugins:update + +OPTIONS + -h, --help show CLI help + -v, --verbose +``` + +### `coral-cli story:get` +Fetches a story by `id` or `url`, useful to view Story metadata obtained by the scraper. +```USAGE + $ coral-cli story:get + +OPTIONS + -d, --domain=domain (required) domain for tenant to run command against + --id=id find a story by ID + --url=url find a story by URL +``` + +### `coral-cli story:merge` +Merge duplicate stories and their comments into a single story. Story metadata & url are maintained on destination. +``` +USAGE + $ coral-cli story:merge + +OPTIONS + -d, --domain=domain (required) domain for tenant to run command against + --from=from (required) source Story ID that will be merged from + --into=into (required) destination Story ID that will be merged into +``` + +### `coral-cli story:update` +Target a story by `id` to update its `url`. +``` +USAGE + $ coral-cli story:update + +OPTIONS + -d, --domain=domain (required) domain for tenant to run command against + --id=id (required) the ID of the story to update + --url=url (required) the new URL to update the story to +``` + +### `coral-cli token:create` +Creates a persistent token for the current user (based on running `coral-cli login` above). The token generated can be used to authenticate API requests as the associated user. +``` +USAGE + $ coral-cli token:create + +OPTIONS + -d, --domain=domain (required) domain for tenant to run command against + --name=name (required) name of the token +``` + +### `coral-cli token:list` +Lists tokens on the current user (based on running `coral-cli login` above). +``` +USAGE + $ coral-cli token:list + +OPTIONS + -d, --domain=domain (required) domain for tenant to run command against +``` + +### `coral-cli token:revoke` +Revokes token by `id`. Token must be on the current user (based on running `coral-cli login` above). +``` +USAGE + $ coral-cli token:revoke + +OPTIONS + -d, --domain=domain (required) domain for tenant to run command against + --id=id (required) id of the token to revoke +``` \ No newline at end of file diff --git a/docs/source/version-5-configuration.md b/docs/source/version-5-configuration.md index 9a9a6678b..d1c729000 100644 --- a/docs/source/version-5-configuration.md +++ b/docs/source/version-5-configuration.md @@ -1,6 +1,7 @@ --- title: Configuring Version 5 permalink: /v5/configuration/ +toc: true --- The following environment variables can be set to configure the Coral Server. You @@ -8,64 +9,85 @@ can expose them in your shell via `export NODE_ENV=development` or by placing the variables in a `.env` file in the root of the project in a simple `NODE_ENV=development` format delimited by newlines. -- `NODE_ENV` - Can be one of `production` or `development`. All production - deployments should use `production`. Defaults to `production` when ran with +## `NODE_ENV` +Can be one of `production` or `development`. All production deployments should use `production`. Defaults to `production` when ran with `npm run start` and `development` when run with `npm run start:development`. -- `PORT` - The port to listen for HTTP and Websocket requests. (Default `3000`) -- `MONGODB_URI` - The MongoDB database URI to connect to. - (Default `mongodb://127.0.0.1:27017/coral`) -- `REDIS_URI` - The Redis database URI to connect to. - (Default `redis://127.0.0.1:6379`) -- `REDIS_OPTIONS` - A JSON string with optional configuration options to be used - when connecting to Redis as specified in the [ioredis](https://github.com/luin/ioredis/blob/1dac50a63753c2afc969315cfe38faf0edc50bc5/API.md#new_Redis_new) documentation. - (Default: `{}`) -- `SIGNING_SECRET` - The shared secret to use to sign JSON Web Tokens (JWT) with - the selected signing algorithm. 🚨 **Don't forget to set this variable!** 🚨 - (Default: `keyboard cat`) -- `SIGNING_ALGORITHM` - The signing algorithm to use for signing JWT's. - (Default `HS256`). -- `LOGGING_LEVEL` - The logging level that can be set to one of `fatal`, + +## `PORT` +The port to listen for HTTP and Websocket requests. (Default `3000`) + +## `DEV_PORT` +The port where the Webpack Development server is running on. (Default `8080`) + +## `MONGODB_URI` +The MongoDB database URI to connect to. (Default `mongodb://127.0.0.1:27017/coral`) + +## `REDIS_URI` +The Redis database URI to connect to. (Default `redis://127.0.0.1:6379`) + +## `REDIS_OPTIONS` +A JSON string with optional configuration options to be used when connecting to Redis as specified in the [ioredis](https://github.com/luin/ioredis/blob/1dac50a63753c2afc969315cfe38faf0edc50bc5/API.md#new_Redis_new) documentation. (Default: `{}`) + +## `SIGNING_SECRET` +The shared secret to use to sign JSON Web Tokens (JWT) with the selected signing algorithm. (Default: `keyboard cat`) +🚨 **Don't forget to set this variable!** 🚨 + +## `SIGNING_ALGORITHM` +The signing algorithm to use for signing JWT's. (Default `HS256`). + +## `CONCURRENCY` +The number of worker nodes to spawn to handle web traffic, this should be tied to the number of CPU's available. (Default `os.cpus().length`) + +## `LOCALE` +Specify the default locale to use for all requests without a locale specified. (Default `en-US`) + +## `LOGGING_LEVEL` +The logging level that can be set to one of `fatal`, `error`, `warn`, `info`, `debug`, or `trace`. (Default `info`) -- `STATIC_URI` - The URI that static assets can be accessed from. This URI can - be to a proxy that uses this Coral server on `PORT` as the upstream. Disabled - by default. -- `DISABLE_TENANT_CACHING` - When `true`, all tenants will be loaded from the - database when needed rather than keeping a in-memory copy in sync via - published events on Redis. (Default `false`) -- `DISABLE_MONGODB_AUTOINDEXING` - When `true`, Coral will not perform indexing - operations when it starts up. This can be desired when you've already - installed Coral on the target MongoDB, but want to improve start performance. - **You should not use this parameter unless you know what you're doing! Upgrades - may introduce additional indexes that the application relies on.** - (Default `false`) -- `LOCALE` - Specify the default locale to use for all requests without a locale - specified. (Default `en-US`) -- `ENABLE_GRAPHIQL` - When `true`, it will enable the `/graphiql` even in - production, use with care. (Default `false`) -- `CONCURRENCY` - The number of worker nodes to spawn to handle web traffic, - this should be tied to the number of CPU's available. (Default - `os.cpus().length`) -- `DEV_PORT` - The port where the Webpack Development server is running on. - (Default `8080`) -- `METRICS_USERNAME` - The username for _Basic Authentication_ at the `/metrics` and `/cluster_metrics` - endpoint. -- `METRICS_PASSWORD` - The password for _Basic Authentication_ at the `/metrics` and `/cluster_metrics` - endpoint. -- `CLUSTER_METRICS_PORT` - If `CONCURRENCY` is more than `1`, the metrics are provided at this port under `/cluster_metrics`. (Default `3001`) -- `DISABLE_LIVE_UPDATES` - When `true`, disables subscriptions for the comment - stream for all stories across all tenants (Default `false`) -- `WEBSOCKET_KEEP_ALIVE_TIMEOUT` - A duration in a parsable format (e.g. `30 seconds` - , `1 minute`) that should be used to send keep alive messages through the - websocket to keep the socket alive (Default `30 seconds`) -- `DISABLE_CLIENT_ROUTES` - Disables mounting of client routes for developing with Webpack Dev Server (Default `false`) -- `DISABLE_RATE_LIMITERS` - Disables the rate limiters in development. This will only work when also set to a development environment (Default `false`) -- `SCRAPE_TIMEOUT` - The request timeout (in ms) for scraping operations (Default `10 seconds`) -- `DISABLE_FORCE_SSL` - Disables forcing SSL in production environments. Should not be used except for testing (Default `false`) -- `TRUST_PROXY` - When provided, it configures the "trust proxy" settings for Express (See https://expressjs.com/en/guide/behind-proxies.html) + +## `DISABLE_CLIENT_ROUTES` +Disables mounting of client routes for developing with Webpack Dev Server (Default `false`) + +## `DISABLE_FORCE_SSL` +Disables forcing SSL in production environments. Should not be used except for testing (Default `false`) + +## `DISABLE_LIVE_UPDATES` +When `true`, disables subscriptions for the comment stream for all stories across all tenants (Default `false`) + +## `DISABLE_MONGODB_AUTOINDEXING` +When `true`, Coral will not perform indexing operations when it starts up. This can be desired when you've already installed Coral on the target MongoDB, but want to improve start performance. + +**You should not use this parameter unless you know what you're doing! Upgrades may introduce additional indexes that the application relies on.** +(Default `false`) + +## `DISABLE_RATE_LIMITERS` +Disables the rate limiters in development. This will only work when also set to a development environment (Default `false`) + +## `DISABLE_TENANT_CACHING` +When `true`, all tenants will be loaded from the database when needed rather than keeping a in-memory copy in sync via published events on Redis. (Default `false`) + +## `ENABLE_GRAPHIQL` +When `true`, it will enable the `/graphiql` even in production, **use with care**. (Default `false`) + +## `METRICS_USERNAME` +The username for _Basic Authentication_ at the `/metrics` and `/cluster_metrics` endpoint. + +## `METRICS_PASSWORD` +The password for _Basic Authentication_ at the `/metrics` and `/cluster_metrics` endpoint. + +## `CLUSTER_METRICS_PORT` +If `CONCURRENCY` is more than `1`, the metrics are provided at this port under `/cluster_metrics`. (Default `3001`) + +## `SCRAPE_TIMEOUT` +The request timeout (in ms) for scraping operations (Default `10 seconds`) + +## `STATIC_URI` +The URI that static assets can be accessed from. This URI can be to a proxy that uses this Coral server on `PORT` as the upstream. Disabled by default. ## `TRUST_PROXY` - -If you are encountering issues where urls in the administration are showing with -a `http` instead of `https`, you may need to set the `TRUST_PROXY` setting. +When provided, it configures the "trust proxy" settings for Express. If you are encountering issues where urls in the administration are showing with a `http` instead of `https`, you may need to set the `TRUST_PROXY` setting. Refer to https://expressjs.com/en/guide/behind-proxies.html for possible values of this configuration variable as it pertains to your setup. + +## `WEBSOCKET_KEEP_ALIVE_TIMEOUT` +A duration in a parsable format (e.g. `30 seconds`, `1 minute`) that should be used to send keep alive messages through the websocket to keep the socket alive (Default `30 seconds`) \ No newline at end of file diff --git a/docs/source/version-5-development.md b/docs/source/version-5-development.md index 6dd03f26c..9f08fc738 100644 --- a/docs/source/version-5-development.md +++ b/docs/source/version-5-development.md @@ -101,3 +101,22 @@ npm run docz -- dev ``` After compilation has finished you can access docz at http://localhost:3030/. + + +## Contributing a Translation + +We welcome contributions from the open source community! To get started contributing check out our [Contribution Guidelines](https://github.com/coralproject/talk/blob/master/CONTRIBUTING.md). + +We’re so proud to have received submissions from a lot of 3rd party contributors translating Coral into their own languages. + +You can see what languages Coral currently supports here: https://github.com/coralproject/talk/tree/master/src/locales + +You can set the default language Coral uses in **Admin** > **Configure** > **General**. + +We use the fluent library and store our translations in FTL files in `src/locales/` and `src/core/server/locales/`. To add a new Coral translation, strings are added or removed from localization bundles in the translation files as needed. + +Strings MUST NOT be changed after they've been committed and pushed to master. Changing a string requires creating a new ID with a new name (preferably descriptive instead of incremented) and deletion of the obsolete ID. It's often useful to add a comment above the string with info about how and where the string is used. + +If you are a developer contributing a new language, you’ll need to add the required i18n support in the i18n files (or you can leave that to us if you like). If you’re a non-developer, you can submit the translation via GitHub if you feel comfortable doing that, or feel free to email it to us via our Support: support@coralproject.net + +If you want to suggest a new language or put a placeholder for a translation you’re working on, feel free to create a GitHub issue: https://github.com/coralproject/talk/issues/new \ No newline at end of file diff --git a/docs/source/version-5-integrating.md b/docs/source/version-5-integrating.md index fd4c0c420..927bdabb1 100644 --- a/docs/source/version-5-integrating.md +++ b/docs/source/version-5-integrating.md @@ -3,7 +3,7 @@ title: Integrating on your site permalink: /v5/integrating/cms/ --- -With Coral setup and running you can embed the comment stream with this sample embed script: +With Coral setup and running locally you can find your **Embed code** under **Configure** > **Advanced** (logged in as an ADMIN). It should look something like this, but with your domain in place of `CORAL_DOMAIN_NAME`. You can test placing the comment stream embed on your page with this sample embed script: ```
@@ -27,3 +27,59 @@ With Coral setup and running you can embed the comment stream with this sample e ``` > **NOTE:** Replace the value of `{% raw %}{{ CORAL_DOMAIN_NAME }}{% endraw %}` with the location of your running instance of Coral. + + +## Story Creation + +Lazy `Story` Creation enables stories to be automatically created when they are published from your CMS. Triggering the embed script above renders the comment stream iFrame on your page. By default that script dynamically generates `Stories` in Coral for seamless integration. + +### storyURL + +If you do not specify a `storyURL` when rendering the embed, the `storyURL` is first inferred from the Canonical link element, which takes the form of a element in your of the page: +```html + + + + + + + ... + + +``` + +The url must reference an existing Permitted Domain. If your articles/stories always have unique urls, then you will not need to modify the default behavior. + +If this tag is not present, or if the canonical URL references a different url than your site such as a wire service, you can specify the `storyURL` parameter in the render function. + +The url will be used by Coral to build user facing links, and should reference the location where you would direct a user back to this particular story or article. + +### storyID + +To more tightly couple Coral with your CMS you can provide your CMS's unique identifier to Coral by including a `storyID` parameter in the render function. Doing so will allow you to target the `Story` for later updates via Coral's Graphql API, such as updating the URL if it changes. + +## Integration via API + +Story creation can also be controlled by direct calls to Coral's API. When Lazy Story Creation is disabled embed streams can only be created by data migration or API POST request. + +See [GraphQL API Overview](/talk/v5/api/overview/) for help with the API. + +## Story Scraping + +By default, stories have their metadata scraped when they are loaded. This provides the easiest way for newsrooms to integrate their CMS’s into Coral in a simple way. We use the following meta tags on the target pages that allow us to extract some properties. + +Metadata scraping is performed by the `scraper` job which is enabled by default. + +If your production site is behind a paywall or otherwise prevents scraping, you might need to confiugre a **Scraper Proxy URL**. When specified it allows scraping requests to use the provided proxy. All requests are then passed through the appropriote proxy as parsed by the npm proxy-agent package. + +| Asset Property | Selector | +|--------------------|----------| +| `title` | See [`metascraper-title`](https://github.com/microlinkhq/metascraper/blob/dc664c37ea1b238b1e3e9d5342edfacc9027892c/packages/metascraper-title/index.js) | +| `description` | See [`metascraper-description`](https://github.com/microlinkhq/metascraper/blob/dc664c37ea1b238b1e3e9d5342edfacc9027892c/packages/metascraper-description/index.js) | +| `image` | See [`metascraper-image`](https://github.com/microlinkhq/metascraper/blob/dc664c37ea1b238b1e3e9d5342edfacc9027892c/packages/metascraper-image/index.js) | +| `author` | See [`metascraper-author`](https://github.com/microlinkhq/metascraper/blob/dc664c37ea1b238b1e3e9d5342edfacc9027892c/packages/metascraper-author/index.js) | +| `publication_date` | See [`metascraper-date`](https://github.com/microlinkhq/metascraper/blob/dc664c37ea1b238b1e3e9d5342edfacc9027892c/packages/metascraper-date/index.js) | +| `modified_date` | `meta[property="article:modified"]` | +| `section` | `meta[property="article:section"]` | + + diff --git a/docs/source/version-5-notifications.md b/docs/source/version-5-notifications.md new file mode 100644 index 000000000..75215a6de --- /dev/null +++ b/docs/source/version-5-notifications.md @@ -0,0 +1,65 @@ +--- +title: Emails & Notifications +permalink: /v5/notifications/ +--- + +There are several email notifications included with Coral by default that will be sent to users based on user activity. + +_NOTE: Notifications are only supported for users that have a valid email address! If you are using authenticate via Facebook, Google, or OpenIDConnect, user emails are not automatically required._ + +### Configuring SMTP + +You must setup SMTP to send email notifications. +See our documentation on [Email SMTP Settings](/talk/v5/administration/#email-smtp-settings) for reference. + +When running in production we recommend using a 3rd party mail service provider like SendGrid or MailGun. + + +### Notification Types + +In addition to the comment activity notifications, Coral also provides users with several transactional notifications about their user profile. + +Comment activity notifications are set to OFF for individual users by default, and commenters must opt-in to enable activity notifications. Commenters cannot enable notifications until they have verified their email, and are not able to opt-out of transactional notifications such as when a user has been Banned or Suspended. + + +#### Type: User Profile Notifications + +* When a new Staff, Moderator, or Admin user is invited, sends invitation +* When any user registers, sends confirmation and email verification link +* When user requests password reset, sends reset link +* When user changes username, sends change confirmation +* When user changes their email address, sends change confirmation and email verification link +* When a user is banned or suspended, sends notice +* When comment history is ready for download (only one link can be generated every 7 days, and the link is valid for 24 hours), sends download link +* When user requests account deletion, cancels account deletion, or account deletion has been completed, sends confirmation + +_NOTE: Users can not opt-out of User Profile Notifications_ + + +#### Type: Comment Activity Notifications + +Commenter users can subscribe to the following comment activity notificaitons: + +* When one of my comments receives a reply +* When a Staff, Moderator, or Admin user replies to one of my comments +* When a Moderator Features one of my comments +* When one of my pending comments has been APPROVED or REJECTED + + +Commenters have 3 options for activity notification frequency: +* Immediately +* Hourly +* Daily + +Immediately will send one email notification per occurance, versus sending an hourly or daily summary with all occurances listed. + +### Email Templates + +Email templates are text based and support translations. Many of the transactional emails can be modified by Moderators at the time of sending to provide additional context to users. + +Coral does not currently support customizing email templates beyond the default templates. + +To view the current email text strings for US English visit: https://github.com/coralproject/talk/blob/master/src/core/server/locales/en-US/email.ftl + + + diff --git a/docs/source/version-5-slack.md b/docs/source/version-5-slack.md index 53819a556..71c6f739c 100644 --- a/docs/source/version-5-slack.md +++ b/docs/source/version-5-slack.md @@ -3,7 +3,7 @@ title: Slack permalink: /v5/integrating/slack/ --- -Coral version 5 supports built-in Slack integration to help you forward comments from your moderation queues into appropriate Slack channels. +Coral version 5.4+ supports built-in Slack integration to help you forward comments from your moderation queues into appropriate Slack channels. ## Creating a Slack App diff --git a/docs/source/version-5-sso.md b/docs/source/version-5-sso.md index f93c2181d..9134dd6f0 100644 --- a/docs/source/version-5-sso.md +++ b/docs/source/version-5-sso.md @@ -14,7 +14,7 @@ learn more about how to create a JWT token, see [this introduction](https://jwt. 5. Copy the string in the `Key` box 6. Click Save -> **NOTE:** Replace the value of ```{{ CORAL_DOMAIN_NAME }}``` with the location of your running instance of Coral. +> **NOTE:** Replace the value of `{% raw %}{{ CORAL_DOMAIN_NAME }}{% endraw %}` with the location of your running instance of Coral. You will then have to generate a JWT with the following claims: diff --git a/docs/themes/coral/layout/partial/sidebar.swig b/docs/themes/coral/layout/partial/sidebar.swig index 0a0b7806c..b33af4d76 100644 --- a/docs/themes/coral/layout/partial/sidebar.swig +++ b/docs/themes/coral/layout/partial/sidebar.swig @@ -15,7 +15,9 @@