FastComments.com

Add Live Discussions to Super.So Sites


FastComments Collab Chat๋Š” Super.so ์‚ฌ์ดํŠธ์— ๋ผ์ด๋ธŒ ์ธ๋ผ์ธ ํ† ๋ก ์„ ์ถ”๊ฐ€ํ•˜์—ฌ ํ•œ ๋‹จ๊ณ„ ๋Œ์–ด์˜ฌ๋ฆฝ๋‹ˆ๋‹ค. ์‚ฌ์šฉ์ž๋Š” ๊ฐ•์กฐ ํ‘œ์‹œํ•˜๊ณ  ๋Œ“๊ธ€์„ ๋‹ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค ํ…์ŠคํŠธ ์ผ๋ถ€๋ฅผ ํ˜‘์—…์ ์œผ๋กœ, ํ•จ๊ป˜ - ์‹ค์‹œ๊ฐ„!

์—ฌ๊ธฐ์„œ๋Š” ์„ค์น˜ ๋‹จ๊ณ„๋ฅผ ์„ค๋ช…ํ•˜๋ฉฐ, ์ด ๊ณผ์ •์€ ๋ช‡ ๋ถ„๋ฐ–์— ๊ฑธ๋ฆฌ์ง€ ์•Š์Šต๋‹ˆ๋‹ค.


1๋‹จ๊ณ„: ์„ค์ • ์—ด๊ธฐ Internal Link

๋จผ์ € ์ฝ”๋“œ ํŽธ์ง‘๊ธฐ๋ฅผ ์—ด์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. FastComments๋ฅผ ๋ชจ๋“  ํŽ˜์ด์ง€์— ์ถ”๊ฐ€ํ•˜๋ ค๋ฉด, ์™ผ์ชฝ ํ•˜๋‹จ์—์„œ Code๋ฅผ ์„ ํƒํ•˜์„ธ์š”:

์ฝ”๋“œ ์„ค์ • ์—ด๊ธฐ
์ฝ”๋“œ ์„ค์ • ์—ด๊ธฐ

ํŠน์ • ํŽ˜์ด์ง€์—๋งŒ ์ถ”๊ฐ€ํ•˜๋ ค๋ฉด ํ•ด๋‹น ํŽ˜์ด์ง€์˜ ์„ค์ •์—์„œ Edit Custom Code๋ฅผ ์„ ํƒํ•˜์„ธ์š”.

์ด์ œ Body ํƒญ์„ ์„ ํƒํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ์ด๊ฒƒ์ด ์ค‘์š”ํ•ฉ๋‹ˆ๋‹ค!. Head์— ์ฝ”๋“œ ์Šค๋‹ˆํŽซ์„ ์„ค์น˜ํ•˜๋ฉด ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

Body ํƒญ ์„ ํƒ
Body ํƒญ ์„ ํƒ

์ด์ œ 2๋‹จ๊ณ„๋กœ ๊ฐˆ ์ค€๋น„๊ฐ€ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.


2๋‹จ๊ณ„: ๋ฏธ๋ฆฌ ๋งŒ๋“ค์–ด์ง„ ์ฝ”๋“œ ์ถ”๊ฐ€ Internal Link


๋‹ค์Œ ๋‹จ๊ณ„์—์„œ๋Š” ์•„๋ž˜์— ๋ฏธ๋ฆฌ ๋งŒ๋“ค์–ด์ง„ ์œ„์ ฏ ์ฝ”๋“œ๋ฅผ ๋ณต์‚ฌํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

FastComments.com์— ๋กœ๊ทธ์ธํ•œ ์ƒํƒœ๋ผ๋ฉด ์•„๋ž˜ ์ฝ”๋“œ ์Šค๋‹ˆํŽซ์— ์ด๋ฏธ ๊ณ„์ • ์ •๋ณด๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋ณต์‚ฌํ•ฉ์‹œ๋‹ค:

Super.so FastComments ํ˜‘์—… ์ฑ„ํŒ… ์ฝ”๋“œ
Copy Copy
1
2<script src="https://cdn.fastcomments.com/js/embed-collab-chat.min.js"></script>
3<script>
4 (function () {
5 let currentPathname = window.location.pathname;
6 let currentWidget = null;
7 let currentTopBar = null;
8
9 function load() {
10 if (!window.FastCommentsCollabChat) {
11 console.log('...no script, trying again...');
12 return setTimeout(load, 100);
13 }
14
15 const target = document.querySelector('.super-content');
16 if (!target || !target.innerHTML || target.innerHTML.length < 100) {
17 console.log('...no content, trying again...');
18 return setTimeout(load, 100);
19 }
20
21 // ๊ธฐ์กด ์ธ์Šคํ„ด์Šค ์ •๋ฆฌ
22 if (target.fastCommentsInstance) {
23 target.fastCommentsInstance.destroy();
24 }
25
26 // ๊ธฐ์กด ์ƒ๋‹จ ๋ฐ”๊ฐ€ ์กด์žฌํ•˜๋ฉด ์ •๋ฆฌ
27 if (currentTopBar && currentTopBar.parentNode) {
28 currentTopBar.parentNode.removeChild(currentTopBar);
29 }
30
31 // ์ƒˆ ์ƒ๋‹จ ๋ฐ” ์ƒ์„ฑ
32 const topBarTarget = document.createElement('div');
33 target.parentNode.insertBefore(topBarTarget, target);
34 topBarTarget.style.maxWidth = 'var(--layout-max-width)';
35 topBarTarget.style.margin = '0 auto';
36 currentTopBar = topBarTarget;
37 currentWidget = target;
38
39 // FastComments Collab Chat ์ดˆ๊ธฐํ™”
40 target.fastCommentsInstance = FastCommentsCollabChat(target, {
41 tenantId: "demo",
42 topBarTarget: topBarTarget
43 });
44
45 // ํ˜„์žฌ pathname ์—…๋ฐ์ดํŠธ
46 currentPathname = window.location.pathname;
47 }
48
49 // ์ดˆ๊ธฐ ๋กœ๋“œ
50 load();
51
52 // ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ 500ms๋งˆ๋‹ค ํ™•์ธ
53 setInterval(() => {
54 // pathname์ด ๋ณ€๊ฒฝ๋˜๋ฉด ๋‹ค์‹œ ๋กœ๋“œ
55 if (window.location.pathname !== currentPathname) {
56 console.log('Pathname changed, reloading...');
57 load();
58 return;
59 }
60
61 // ์œ„์ ฏ์ด ์ œ๊ฑฐ๋˜๋ฉด ๋‹ค์‹œ ๋กœ๋“œ
62 if (currentWidget && !currentWidget.parentNode) {
63 console.log('Widget removed, reloading...');
64 load();
65 return;
66 }
67
68 // ์ปจํ…Œ์ด๋„ˆ๊ฐ€ ๋น„์›Œ์ง€๋ฉด ๋‹ค์‹œ ๋กœ๋“œ
69 const target = document.querySelector('.super-content');
70 if (target && target.innerHTML.length < 100) {
71 console.log('Container emptied, reloading...');
72 load();
73 }
74 }, 500);
75 })();
76</script>
77

์ด์ œ Body ์˜์—ญ์— ๋ถ™์—ฌ๋„ฃ์œผ์„ธ์š”:

๋ถ™์—ฌ๋„ฃ์€ ์ฝ”๋“œ
๋ถ™์—ฌ๋„ฃ์€ ์ฝ”๋“œ

If you see a "this is a demo message" after pasting the code:

  • fastcomments.com ๊ณ„์ •์— ๋กœ๊ทธ์ธํ–ˆ๋Š”์ง€ ํ™•์ธํ•˜์„ธ์š”.
  • ํƒ€์‚ฌ(3rd party) ์ฟ ํ‚ค๊ฐ€ ํ™œ์„ฑํ™”๋˜์–ด ์žˆ๋Š”์ง€ ํ™•์ธํ•˜์„ธ์š”.
  • ๊ทธ๋Ÿฐ ๋‹ค์Œ ์ด ํŽ˜์ด์ง€๋ฅผ ์ƒˆ๋กœ๊ณ ์นจํ•˜๊ณ  ์ฝ”๋“œ ์Šค๋‹ˆํŽซ์„ ๋‹ค์‹œ ๋ณต์‚ฌํ•˜์„ธ์š”. tenantId๊ฐ€ ๊ท€ํ•˜์˜ ํ…Œ๋„ŒํŠธ ์‹๋ณ„์ž๋กœ ์ฑ„์›Œ์ ธ ์žˆ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

์ฐธ๊ณ : ์ผ๋ฐ˜ ๋Œ“๊ธ€ ์œ„์ ฏ Internal Link

Super.so Notion ๋ฌธ์„œ์— ๋ผ์ด๋ธŒ ๋Œ“๊ธ€ ์œ„์ ฏ ์ถ”๊ฐ€ํ•˜๊ธฐ

Collab Chat ์™ธ์—๋„ Notion ๋ฌธ์„œ ํ•˜๋‹จ์— ์ „ํ†ต์ ์ธ ๋Œ“๊ธ€ ์œ„์ ฏ์„ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋ฅผ ํ†ตํ•ด ๋…์ž๋“ค์ด ๋Œ“๊ธ€์„ ๋‚จ๊ธฐ๊ณ  ๋ฌธ์„œ ์ „์ฒด์— ๋Œ€ํ•ด ํ† ๋ก ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์„ค์น˜ ๋‹จ๊ณ„

๋‹ค์Œ ์ฝ”๋“œ๋ฅผ ๋ณต์‚ฌํ•˜์—ฌ Super.so ์‚ฌ์ดํŠธ ์„ค์ •์˜ Body ์„น์…˜์— ๋ถ™์—ฌ๋„ฃ์œผ์„ธ์š”:

Super.so FastComments ๋ผ์ด๋ธŒ ๋Œ“๊ธ€ ์œ„์ ฏ
Copy Copy
1
2<script src="https://cdn.fastcomments.com/js/embed-v2.min.js"></script>
3<script>
4 (function () {
5 let currentPathname = window.location.pathname;
6 let currentWidget = null;
7
8 function load() {
9 if (!window.FastCommentsUI) {
10 console.log('...no script, trying again...');
11 return setTimeout(load, 100);
12 }
13
14 const contentArea = document.querySelector('.notion-root');
15 if (!contentArea || !contentArea.innerHTML || contentArea.innerHTML.length < 100) {
16 console.log('...no content, trying again...');
17 return setTimeout(load, 100);
18 }
19
20 // ๊ธฐ์กด ์ธ์Šคํ„ด์Šค ์ •๋ฆฌ
21 if (contentArea.fastCommentsInstance) {
22 contentArea.fastCommentsInstance.destroy();
23 }
24
25 // ์ƒˆ ๋Œ€์ƒ ์ƒ์„ฑ
26 const target = document.createElement('div');
27 contentArea.append(target);
28 currentWidget = target;
29
30 // FastComments ์ดˆ๊ธฐํ™”
31 contentArea.fastCommentsInstance = FastCommentsUI(target, {
32 tenantId: "demo",
33 urlId: window.location.pathname
34 });
35
36 // ํ˜„์žฌ pathname ์—…๋ฐ์ดํŠธ
37 currentPathname = window.location.pathname;
38 }
39
40 // ์ดˆ๊ธฐ ๋กœ๋“œ
41 load();
42
43 // ๋ณ€๊ฒฝ ์‚ฌํ•ญ ํ™•์ธ(500ms๋งˆ๋‹ค)
44 setInterval(() => {
45 // pathname์ด ๋ณ€๊ฒฝ๋˜๋ฉด ๋‹ค์‹œ ๋กœ๋“œ
46 if (window.location.pathname !== currentPathname) {
47 console.log('Pathname changed, reloading...');
48 load();
49 return;
50 }
51
52 // ์œ„์ ฏ์ด ์ œ๊ฑฐ๋˜๋ฉด ๋‹ค์‹œ ๋กœ๋“œ
53 if (currentWidget && !currentWidget.parentNode) {
54 console.log('Widget removed, reloading...');
55 load();
56 return;
57 }
58
59 // ์ปจํ…Œ์ด๋„ˆ๊ฐ€ ๋น„์–ด์žˆ์œผ๋ฉด ๋‹ค์‹œ ๋กœ๋“œ
60 const contentArea = document.querySelector('.notion-root');
61 if (contentArea && contentArea.innerHTML.length < 100) {
62 console.log('Container emptied, reloading...');
63 load();
64 }
65 }, 500);
66 })();
67</script>
68

์ค‘์š” ์ฐธ๊ณ  ์‚ฌํ•ญ

  • ๋Œ“๊ธ€ ์œ„์ ฏ์ด Notion ๋ฌธ์„œ ํ•˜๋‹จ์— ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค
  • ๊ฐ ํŽ˜์ด์ง€๋Š” URL ๊ฒฝ๋กœ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ๊ณ ์œ ํ•œ ๋Œ“๊ธ€ ์Šค๋ ˆ๋“œ๋ฅผ ๊ฐ€์ง‘๋‹ˆ๋‹ค
  • FastComments ๊ณ„์ •์—์„œ ์‹ค์ œ tenant ID๋กœ "demo"๋ฅผ ๋ฐ˜๋“œ์‹œ ๊ต์ฒดํ•˜์„ธ์š”
  • ์ด ์œ„์ ฏ์€ Super.so์˜ ๋™์  ํŽ˜์ด์ง€ ๋กœ๋”ฉ์„ ์ž๋™์œผ๋กœ ์ฒ˜๋ฆฌํ•ฉ๋‹ˆ๋‹ค

๋งž์ถค ์„ค์ • Internal Link

FastComments๋Š” ์‚ฌ์ดํŠธ์— ๋งž๊ฒŒ ๋งž์ถคํ™”๋˜๋„๋ก ์„ค๊ณ„๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

์‚ฌ์šฉ์ž ์ •์˜ ์Šคํƒ€์ผ์„ ์ถ”๊ฐ€ํ•˜๊ฑฐ๋‚˜ ๊ตฌ์„ฑ์„ ์กฐ์ •ํ•˜๋ ค๋ฉด, ๋งž์ถค ์„ค์ • ๋ฌธ์„œ์—์„œ ๋ฐฉ๋ฒ•์„ ์•Œ์•„๋ณด์„ธ์š”.