Install LibreNMS on Ubuntu 22.04
October 19, 2025
Search
Recent Posts

/** * 1) Run Highlight.js on all blocks * 2) Add VS Code-style line-number gutter * 3) Wrap bash/sh blocks in a Mac terminal chrome container with auto label * 4) Preserve existing inner HTML (spans) and logical lines */ (function(){ // 1) Highlight everything hljs.highlightAll();// Utility: split innerHTML by newlines while preserving markup function wrapLinesPreserveHTML(codeEl){ // Avoid double-processing if (codeEl.dataset.linesWrapped === "1") return;// Normalize line breaks const html = codeEl.innerHTML.replace(/rn/g, 'n').replace(/r/g, 'n'); const parts = html.split('n'); const wrapped = parts.map(line => `${line || ''}`).join('n'); codeEl.innerHTML = wrapped; codeEl.dataset.linesWrapped = "1"; }// 2) Add gutter + 3) Terminal chrome for bash/sh document.querySelectorAll('pre > code').forEach(code => { const pre = code.parentElement;// Apply line numbers (gutter) only once if (!pre.classList.contains('with-gutter')) { pre.classList.add('with-gutter'); if (!code.classList.contains('hljs')) code.classList.add('hljs'); // ensure class for padding/colors wrapLinesPreserveHTML(code); }// Terminal chrome for bash/sh only const langMatch = (code.className || '').match(/language-([a-z0-9+_-]+)/i); const language = langMatch ? langMatch[1] : ''; const isShell = /^(ba?sh|sh)$/.test(language);if (isShell) { // Avoid double-wrapping if (!pre.parentElement || !pre.parentElement.classList.contains('code-terminal')) { // Build chrome const wrapper = document.createElement('div'); wrapper.className = 'code-terminal';const bar = document.createElement('div'); bar.className = 'term-bar';const dots = document.createElement('span'); dots.className = 'term-dots'; dots.innerHTML = '';const title = document.createElement('span'); title.className = 'term-title'; title.textContent = (language || 'bash');bar.appendChild(dots); bar.appendChild(title);// Insert wrapper around
pre.parentNode.insertBefore(wrapper, pre); wrapper.appendChild(bar); wrapper.appendChild(pre); } } }); })();Select the fields to be shown. Others will be hidden. Drag and drop to rearrange the order.
- Image
- SKU
- Rating
- Price
- Stock
- Availability
- Add to cart
- Description
- Content
- Weight
- Dimensions
- Additional information