Merge pull request #18422 from dvdksn/dockerfile-tooltips

feat: add dockerfile tooltips
This commit is contained in:
David Karlsson authored and GitHub committed 2023-10-13 20:47:41 +02:00
commit 580ec0e746
2 files changed
+13 -1

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
const cmds = document.querySelectorAll(".language-dockerfile span.k");
for (const cmd of cmds) {
const name = cmd.textContent;
const a = document.createElement("a")
a.classList.add("underline","underline-offset-4","decoration-dashed","cursor-pointer")
a.title = `Learn more about the ${name} instruction`
a.href = `/engine/reference/builder/#${name.toLowerCase()}`
a.innerHTML = cmd.outerHTML
cmd.insertAdjacentElement("beforebegin", a)
cmd.remove()
}
+1 -1
View File
@@ -1,6 +1,6 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./hugo_stats.json","./layouts/**/*.{html,js}", "./content/**/*.md"],
content: ["./hugo_stats.json","./layouts/**/*.{html,js}", "./content/**/*.md", "assets/js/**/*.js"],
darkMode: "class",
theme: {
extend: {