diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 16bba40e6..af00fdcfc 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -18,7 +18,7 @@ jobs: pull-requests: write steps: - - uses: actions/stale@v8 + - uses: actions/stale@v9 with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-issue-message: 'This issue will be closed since it has been stale for 60 days.' diff --git a/assets/js/search.js b/assets/js/search.js index 3d92b3ed8..3f08cb376 100644 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -63,6 +63,21 @@ document.addEventListener("keydown", function (event) { } } } + + // Enter to get to results + if (event.key == "Enter") { + if (searchVisible && hasResults) { + event.preventDefault(); + if (document.activeElement == input) { + first.focus(); + } else { + document.activeElement.click(); + } + }else{ + event.preventDefault(); + } + } + }); // Update search on each keypress diff --git a/config.toml b/config.toml index 67be15380..3f8c96bf5 100644 --- a/config.toml +++ b/config.toml @@ -2,4 +2,4 @@ [module.hugoVersion] extended = true min = "0.87.0" - max = "0.121.0" \ No newline at end of file + max = "0.121.1" \ No newline at end of file diff --git a/exampleSite/content/docs/shortcodes/index.md b/exampleSite/content/docs/shortcodes/index.md index 156bf6071..8fa2db74d 100644 --- a/exampleSite/content/docs/shortcodes/index.md +++ b/exampleSite/content/docs/shortcodes/index.md @@ -456,6 +456,31 @@ The `where` and `value` values are used in the following query `where .Site.Regu


+## Markdown Importer + +This shortcode allows you to import markdown files from external sources. This is useful for including content from other repositories or websites without having to copy and paste the content. + + +| Parameter | Description | +| --------- | ------------------------------------------------------- | +| `url` | **Required** URL to an externally hosted markdown file. | + + + + + +**Example:** + +```md +{{}} + +``` + +{{< mdimporter url="https://raw.githubusercontent.com/nunocoracao/nunocoracao/master/README.md" >}} + + +

+ ## Mermaid `mermaid` allows you to draw detailed diagrams and visualisations using text. It uses Mermaid under the hood and supports a wide variety of diagrams, charts and other output formats. diff --git a/exampleSite/content/users/users.json b/exampleSite/content/users/users.json index bc2d6546a..fb43a1143 100644 --- a/exampleSite/content/users/users.json +++ b/exampleSite/content/users/users.json @@ -504,5 +504,20 @@ "Personal Site", "Blog" ] + }, + { + "title": "technicaldc.github.io", + "url": "https://technicaldc.github.io/", + "tags": [ + "Personal Site", + "Blog" + ] + }, + { + "title": "binarydigit.cafe", + "url": "https://binarydigit.cafe/", + "tags": [ + "Personal site" + ] } ] diff --git a/layouts/shortcodes/mdimporter.html b/layouts/shortcodes/mdimporter.html new file mode 100644 index 000000000..28b24fe21 --- /dev/null +++ b/layouts/shortcodes/mdimporter.html @@ -0,0 +1,6 @@ +{{ $url := .Get "url"}} +{{ with resources.GetRemote (printf $url) }} +{{ .Content | markdownify }} +{{ else }} +{{ errorf "Mardown Importer Shortcode - Unable to get remote resource" . }} +{{ end }} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index ff930426f..b8b907005 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "hugo-blowfish-theme", - "version": "2.46.0", + "version": "2.47.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "hugo-blowfish-theme", - "version": "2.46.0", + "version": "2.47.2", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -22,10 +22,10 @@ "jquery": "^3.7.1", "katex": "^0.16.9", "packery": "^2.1.2", - "prettier": "^3.1.0", + "prettier": "^3.1.1", "prettier-plugin-go-template": "^0.0.15", "prettier-plugin-tailwindcss": "^0.5.9", - "puppeteer": "^21.5.2", + "puppeteer": "^21.6.0", "rimraf": "^5.0.5", "tailwindcss": "^3.3.6", "tw-elements": "1.1.0", @@ -227,9 +227,9 @@ } }, "node_modules/@puppeteer/browsers": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-1.8.0.tgz", - "integrity": "sha512-TkRHIV6k2D8OlUe8RtG+5jgOF/H98Myx0M6AOafC8DdNVOFiBSFa5cpRDtpm8LXOa9sVwe0+e6Q3FC56X/DZfg==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-1.9.0.tgz", + "integrity": "sha512-QwguOLy44YBGC8vuPP2nmpX4MUN2FzWbsnvZJtiCzecU3lHmVZkaC1tq6rToi9a200m8RzlVtDyxCS0UIDrxUg==", "dev": true, "dependencies": { "debug": "4.3.4", @@ -280,9 +280,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.9.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.4.tgz", - "integrity": "sha512-wmyg8HUhcn6ACjsn8oKYjkN/zUzQeNtMy44weTJSM6p4MMzEOuKbA3OjJ267uPCOW7Xex9dyrNTful8XTQYoDA==", + "version": "20.10.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.4.tgz", + "integrity": "sha512-D08YG6rr8X90YB56tSIuBaddy/UXAA9RKJoFvrsnogAum/0pmjkgi4+2nx96A330FmioegBWmEYQ+syqCFaveg==", "dev": true, "optional": true, "dependencies": { @@ -599,9 +599,9 @@ } }, "node_modules/chromium-bidi": { - "version": "0.4.33", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.33.tgz", - "integrity": "sha512-IxoFM5WGQOIAd95qrSXzJUv4eXIrh+RvU3rwwqIiwYuvfE7U/Llj4fejbsJnjJMUYCuGtVQsY2gv7oGl4aTNSQ==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.5.1.tgz", + "integrity": "sha512-dcCqOgq9fHKExc2R4JZs/oKbOghWpUNFAJODS8WKRtLhp3avtIH5UDCBrutdqZdh3pARogH8y1ObXm87emwb3g==", "dev": true, "dependencies": { "mitt": "3.0.1", @@ -2005,9 +2005,9 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, "node_modules/prettier": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", - "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz", + "integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -2157,28 +2157,31 @@ } }, "node_modules/puppeteer": { - "version": "21.5.2", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-21.5.2.tgz", - "integrity": "sha512-BaAGJOq8Fl6/cck6obmwaNLksuY0Bg/lIahCLhJPGXBFUD2mCffypa4A592MaWnDcye7eaHmSK9yot0pxctY8A==", + "version": "21.6.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-21.6.0.tgz", + "integrity": "sha512-u6JhSF7xaPYZ2gd3tvhYI8MwVAjLc3Cazj7UWvMV95A07/y7cIjBwYUiMU9/jm4z0FSUORriLX/RZRaiASNWPw==", "dev": true, "hasInstallScript": true, "dependencies": { - "@puppeteer/browsers": "1.8.0", + "@puppeteer/browsers": "1.9.0", "cosmiconfig": "8.3.6", - "puppeteer-core": "21.5.2" + "puppeteer-core": "21.6.0" + }, + "bin": { + "puppeteer": "lib/esm/puppeteer/node/cli.js" }, "engines": { "node": ">=16.13.2" } }, "node_modules/puppeteer-core": { - "version": "21.5.2", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-21.5.2.tgz", - "integrity": "sha512-v4T0cWnujSKs+iEfmb8ccd7u4/x8oblEyKqplqKnJ582Kw8PewYAWvkH4qUWhitN3O2q9RF7dzkvjyK5HbzjLA==", + "version": "21.6.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-21.6.0.tgz", + "integrity": "sha512-1vrzbp2E1JpBwtIIrriWkN+A0afUxkqRuFTC3uASc5ql6iuK9ppOdIU/CPGKwOyB4YFIQ16mRbK0PK19mbXnaQ==", "dev": true, "dependencies": { - "@puppeteer/browsers": "1.8.0", - "chromium-bidi": "0.4.33", + "@puppeteer/browsers": "1.9.0", + "chromium-bidi": "0.5.1", "cross-fetch": "4.0.0", "debug": "4.3.4", "devtools-protocol": "0.0.1203626", @@ -2457,9 +2460,9 @@ } }, "node_modules/streamx": { - "version": "2.15.5", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.5.tgz", - "integrity": "sha512-9thPGMkKC2GctCzyCUjME3yR03x2xNo0GPKGkRw2UMYN+gqWa9uqpyNWhmsNCutU5zHmkUum0LsCRQTXUgUCAg==", + "version": "2.15.6", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.6.tgz", + "integrity": "sha512-q+vQL4AAz+FdfT137VF69Cc/APqUbxy+MDOImRrMvchJpigHj9GksgDU2LYbO9rx7RX6osWgxJB2WxhYv4SZAw==", "dev": true, "dependencies": { "fast-fifo": "^1.1.0", diff --git a/package.json b/package.json index d8b0e9769..ad9b72083 100644 --- a/package.json +++ b/package.json @@ -40,10 +40,10 @@ "jquery": "^3.7.1", "katex": "^0.16.9", "packery": "^2.1.2", - "prettier": "^3.1.0", + "prettier": "^3.1.1", "prettier-plugin-go-template": "^0.0.15", "prettier-plugin-tailwindcss": "^0.5.9", - "puppeteer": "^21.5.2", + "puppeteer": "^21.6.0", "rimraf": "^5.0.5", "tailwindcss": "^3.3.6", "tw-elements": "1.1.0",