Skip to content

Commit

Permalink
Create custom.js
Browse files Browse the repository at this point in the history
  • Loading branch information
OOAAHH authored Oct 29, 2024
1 parent 9a1ede3 commit f11a402
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions assets/js/custom.js
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit f11a402

Please sign in to comment.