Add hljs
This commit is contained in:
parent
44d86d523b
commit
489a347c22
4 changed files with 10 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
|||
* NPM module files to be imported into /js/libraries.js
|
||||
*/
|
||||
define('NODE_IMPORT_JS', [
|
||||
'highlightjs/highlight.pack.min.js',
|
||||
'timeago.js/dist/timeago.min.js',
|
||||
'timeago.js/dist/timeago.locales.min.js',
|
||||
]);
|
||||
|
@ -15,9 +16,10 @@ define('NODE_IMPORT_JS', [
|
|||
* NPM module files to be imported into /css/libraries.css
|
||||
*/
|
||||
define('NODE_IMPORT_CSS', [
|
||||
'highlightjs/styles/default.css',
|
||||
'highlightjs/styles/tomorrow-night.css',
|
||||
]);
|
||||
|
||||
|
||||
/**
|
||||
* BEYOND THIS POINT YOU WON'T HAVE TO EDIT THE CONFIG PRETTY MUCH EVER
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"highlightjs": "^9.10.0",
|
||||
"timeago.js": "^3.0.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
{% include '@mio/_layout/meta.twig' %}
|
||||
<link href="https://static.flash.moe/fonts/visitor/visitor1.css" rel="stylesheet">
|
||||
<link href="/css/mio.css" rel="stylesheet">
|
||||
<link href="/css/libraries.css" rel="stylesheet">
|
||||
</head>
|
||||
<body class="mio">
|
||||
<div class="mio__wrapper">
|
||||
|
@ -81,6 +82,7 @@
|
|||
<script>
|
||||
window.addEventListener('load', () => {
|
||||
timeago().render(document.querySelectorAll('time'));
|
||||
hljs.initHighlighting();
|
||||
});
|
||||
|
||||
// move this to an external JS/TS file eventually.
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
version "2.0.49"
|
||||
resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-2.0.49.tgz#95bd7064caebf65bde10429dff491a1aea05b67d"
|
||||
|
||||
highlightjs@^9.10.0:
|
||||
version "9.10.0"
|
||||
resolved "https://registry.yarnpkg.com/highlightjs/-/highlightjs-9.10.0.tgz#fca9b78ddaa3b1abca89d6c3ee105ad270a80190"
|
||||
|
||||
timeago.js@^3.0.2:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/timeago.js/-/timeago.js-3.0.2.tgz#32a67e7c0d887ea42ca588d3aae26f77de5e76cc"
|
||||
|
|
Loading…
Add table
Reference in a new issue