add代码高亮

This commit is contained in:
浪子
2024-07-02 09:26:49 +08:00
parent b647b0cf80
commit 8449fd35ca
8 changed files with 17698 additions and 6 deletions
+3 -2
View File
@@ -6,7 +6,8 @@
</div>
<?php $this->options->tongji(); ?>
</footer>
<script>
<?php if ($this->options->showprism): ?>
<script>
document.addEventListener('DOMContentLoaded', function () {
var defaultLanguage = 'javascript'; // 设置默认语言
document.querySelectorAll('pre code').forEach(function (block) {
@@ -17,7 +18,7 @@
Prism.highlightAll();
});
</script>
<?php endif; ?>
</div>
</body>
</html>