Tecnoblog의 Discourse 댓글 사용 경험

동적 높이(dynamic height)가 올바르게 작동하지 않아 어려움을 겪고 있습니다. Discourse를 업데이트하고 스니펫을 최신 구성으로 새로고침해도 문제가 계속됩니다.

        <h4 class="comments-main-title component-title">Comentários</h4>
        <div id='discourse-comments'></div>

        <meta name='discourse-username' content='<?php echo esc_attr($discourse_author); ?>'>

        <script type="text/javascript">
            DiscourseEmbed = {
                discourseUrl: '<?php echo esc_url($discourse_url); ?>',
                
                <?php if ($use_topic_id): ?>
                    // ID 모드: 데이터베이스에 저장된 토픽, URL 변경에 영향받지 않음
                    topicId: <?php echo intval($topic_id); ?>,
                <?php else: ?>
                    // URL 모드: API를 통한 생성이 실패할 때의 폴백
                    discourseEmbedUrl: '<?php echo esc_url($permalink); ?>',
                <?php endif; ?>
                fullApp: true,
                lazyLoad: true, // iframe의 지연 로딩 비활성화
                lazyLoadMargin: '1500', // 뷰포트 시작 전 픽셀 수
                dynamicHeight: true,
                embedMinHeight: '400',
                embedMaxHeight: '3000',
					  embedHeight: '800px',
                // className: 'CLASS_NAME',
            };

            (function() {
            var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
            d.src = DiscourseEmbed.discourseUrl + 'javascripts/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);
            })();
        </script>
4개의 좋아요