我在让动态高度正常工作方面遇到了困难。尽管已更新 Discourse 并使用最新配置刷新了我的代码片段,但问题仍然存在。
<h4 class="comments-main-title component-title">评论</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>
https://tecnoblog.net/noticias/samsung-wallet-agora-suporta-pix-por-aproximacao/