FastComments.com

Add Live Commenting to Typeflo.io Blogs


Що охоплює цей посібник

У цьому посібнику описано налаштування живих коментарів за допомогою FastComments у блогах Typeflo.io.

1. Знайти поле введення коду Internal Link

Щоб додати FastComments до вашого блогу на Typeflo.io, спочатку перейдіть на панель керування свого блогу та натисніть Налаштування у лівій бічній панелі.

Натисніть Налаштування
Перейдіть до Налаштувань у Typeflo.io

Далі натисніть вкладку Користувацький код у верхній частині сторінки налаштувань.

Натисніть вкладку Користувацький код
Натисніть вкладку Користувацький код у налаштуваннях Typeflo.io

Ви побачите три розділи для додавання користувацького коду: Header, Body та Footer. Для FastComments ми будемо використовувати розділ Footer.

2. Вставити код Internal Link

In the Footer section of the Custom Code tab, paste the following code:

Фрагмент коду для живих коментарів Typeflo.io
Copy Copy
1
2<script src="https://cdn.fastcomments.com/js/embed-v2.min.js" async></script>
3<script>
4 (function () {
5 function load() {
6 let target = null;
7 let lastInstance;
8 if (document.querySelector('.fastcomments-widget')) {
9 setTimeout(load, 1000);
10 return;
11 }
12 if (lastInstance) {
13 lastInstance.destroy();
14 }
15 if (window.FastCommentsUI) {
16 const newElement = document.createElement('div');
17 newElement.classList.add('fastcomments-widget');
18 const subscribeSection = document.querySelector('.nc-SectionSubscribe2');
19 if (subscribeSection) {
20 subscribeSection.parentNode.insertBefore(newElement, subscribeSection);
21 target = newElement;
22 } else {
23 const fullWidthSection = document.querySelector('.container.w-full');
24 if (fullWidthSection) {
25 fullWidthSection.prepend(newElement);
26 target = newElement;
27 }
28 }
29 }
30 if (target) {
31 lastInstance = FastCommentsUI(target, {
32 "tenantId": "demo"
33 });
34 }
35 setTimeout(load, 1000);
36 }
37
38 load();
39 })();
40</script>
41
Вставте код у розділ Footer
Вставте код FastComments у розділ Footer

After pasting the code, click the Save button to apply your changes.

Note: This code includes logic to dynamically place the FastComments widget in the optimal location on your Typeflo.io blog posts. Other code snippets will not work properly with Typeflo.io's layout.

Remember to replace 'demo' with your actual FastComments tenant ID after signing up. If you're logged in to FastComments.com, it should already be replaced.

Успіх Internal Link

Чудова робота! Ви додали можливість живих коментарів до вашого блогу Typeflo.io.

FastComments тепер з’являтиметься у всіх ваших дописах блогу, дозволяючи вашим читачам брати участь у дискусіях.

Якщо ви зіткнулися з помилкою 'permission denied', або хочете налаштувати FastComments, читайте далі.

Налаштування Internal Link

FastComments спроєктовано так, щоб його можна було налаштувати відповідно до дизайну вашого блогу.

Якщо ви хочете додати власні стилі або відкоригувати конфігурацію, Ознайомтеся з нашою документацією з налаштування та кастомізації, щоб дізнатися, як.

Для блогів Typeflo.io ви можете додати власні CSS-стилі в тій самій секції Custom Code, куди ви додали скрипт FastComments.