Skip to content

Commit

Permalink
Merge pull request #1123 from nunocoracao/dev
Browse files Browse the repository at this point in the history
🔖 v2.48.0
  • Loading branch information
nunocoracao authored Dec 14, 2023
2 parents ea8344a + ff98399 commit b6744ef
Show file tree
Hide file tree
Showing 8 changed files with 97 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
Expand Down
15 changes: 15 additions & 0 deletions assets/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
[module.hugoVersion]
extended = true
min = "0.87.0"
max = "0.121.0"
max = "0.121.1"
25 changes: 25 additions & 0 deletions exampleSite/content/docs/shortcodes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,31 @@ The `where` and `value` values are used in the following query `where .Site.Regu

<br/><br/><br/>

## 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.

<!-- prettier-ignore-start -->
| Parameter | Description |
| --------- | ------------------------------------------------------- |
| `url` | **Required** URL to an externally hosted markdown file. |


<!-- prettier-ignore-end -->


**Example:**

```md
{{</* mdimporter url="https://raw.githubusercontent.com/nunocoracao/nunocoracao/master/README.md" */>}}

```

{{< mdimporter url="https://raw.githubusercontent.com/nunocoracao/nunocoracao/master/README.md" >}}


<br/><br/>

## 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.
Expand Down
15 changes: 15 additions & 0 deletions exampleSite/content/users/users.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
]
6 changes: 6 additions & 0 deletions layouts/shortcodes/mdimporter.html
Original file line number Diff line number Diff line change
@@ -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 }}
61 changes: 32 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit b6744ef

Please sign in to comment.