diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 9adeb9b188..27ea92cd7d 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -155,10 +155,26 @@ jobs: if (changedFiles.length > 0) { commentBody += `### 🔄 Modified Documents\n\n`; changedFiles.forEach(file => { - if (file.endsWith('.qmd') || file.endsWith('.md')) { + let fileUrlPath; + + // Define a mapping for special files to their corresponding URLs + const specialFileMapping = { + 'docs/extensions/listings/shortcodes-and-filters.yml': 'docs/extensions/index.html', + 'docs/extensions/listings/journal-articles.yml': 'docs/extensions/index.html', + 'docs/extensions/listings/custom-formats.yml': 'docs/extensions/index.html', + 'docs/extensions/listings/revealjs-formats.yml': 'docs/extensions/index.html', + 'docs/extensions/listings/revealjs.yml': 'docs/extensions/index.html' + }; + + // Check if the file is in the special mapping + if (specialFileMapping[file]) { + fileUrlPath = specialFileMapping[file]; + } else if (file.endsWith('.qmd') || file.endsWith('.md')) { // Convert path to URL (removing file extension and adding appropriate path) - const fileUrlPath = file - .replace(/\.(qmd|md)$/, '.html'); + fileUrlPath = file.replace(/\.(qmd|md)$/, '.html'); + } + + if (fileUrlPath) { const fileUrl = `${deployUrl}/${fileUrlPath}`; commentBody += `- [${file}](${fileUrl})\n`; } diff --git a/docs/extensions/listings/shortcodes-and-filters.yml b/docs/extensions/listings/shortcodes-and-filters.yml index bb5c17ab95..80953520c1 100644 --- a/docs/extensions/listings/shortcodes-and-filters.yml +++ b/docs/extensions/listings/shortcodes-and-filters.yml @@ -374,6 +374,12 @@ documents (`format: html`) similar as how [`code-line-numbers`](https://quarto.org/docs/reference/formats/html.html#code) works for RevealJs. +- name: linkate + path: https://github.com/coatless-quarto/linkate + author: '[James Joseph Balamuta](https://github.com/coatless/)' + description: > + Automatically collect all URLs in a document and place them at the end under a "Links" section. + - name: lordicon path: https://github.com/jmgirard/lordicon author: '[Jeffrey Girard](https://github.com/jmgirard)'