Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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`;
}
Expand Down
6 changes: 6 additions & 0 deletions docs/extensions/listings/shortcodes-and-filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)'
Expand Down
Loading