diff --git a/assets/js/custom.js b/assets/js/custom.js new file mode 100644 index 00000000..f012f5cb --- /dev/null +++ b/assets/js/custom.js @@ -0,0 +1,9 @@ +// 引入 Prism.js 的核心 JS +const prismCore = document.createElement('script'); +prismCore.src = 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js'; +document.head.appendChild(prismCore); + +// 引入 Prism.js Line Numbers 插件的 JS +const prismLineNumbers = document.createElement('script'); +prismLineNumbers.src = 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/line-numbers/prism-line-numbers.min.js'; +document.head.appendChild(prismLineNumbers);