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
80 changes: 45 additions & 35 deletions docs/_extensions/mcanouil/atelier/_extension.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,59 @@
title: Atelier
author: MickaΓ«l Canouil
version: 0.10.1
quarto-required: '>=1.9.36'
source: mcanouil/quarto-atelier@0.10.1
source-type: registry
version: 0.10.2
quarto-required: ">=1.9.36"
contributes:
project:
project:
type: website
output-dir: _site
website:
repo-actions: [edit, issue]
repo-link-target: _blank
repo-link-rel: noopener noreferrer
# `locale` matches `lang: en-GB` below; override the two together.
# Naming `twitter-card` at all is what switches Quarto's Twitter
# provider on, after which it inherits title, description, image, and
# image alt from each page.
open-graph:
locale: en_GB
twitter-card:
card-style: summary_large_image
page-navigation: true
back-to-top-navigation: true
llms-txt: true
search:
location: navbar
type: overlay
# `background` and `foreground` are left to the theme on both bars: the
# chrome palette in `html/chrome.scss` sets `$navbar-bg`, `$navbar-fg`,
# `$footer-bg`, and `$footer-fg` from a layer Quarto evaluates first, so
# naming them here would be a configuration with no effect.
navbar:
search: true
page-footer:
border: true
left: |
Powered by [Quarto](https://quarto.org){target="_blank" rel="noopener noreferrer"}.
center: |
© []{#current-year} [MickaΓ«l CANOUIL](https://mickael.canouil.fr){target="_blank" rel="noopener noreferrer"}.
format: atelier-html
formats:
common:
lang: en-GB
date-format: dddd[, the] Do [of] MMMM, YYYY
date-format: "dddd[, the] Do [of] MMMM, YYYY"
code-copy: true
code-overflow: wrap
code-link: false
html:
respect-user-color-scheme: true
# Quarto builds the canonical link from `website.site-url`, giving a
# directory index the URL of its directory. Set `canonical-url: false`
# on a page served from more than one URL, such as `404.qmd`.
canonical-url: true
# `html/chrome.scss` comes before `brand` on purpose: Quarto evaluates
# user layer defaults in reverse list order, so a file placed first is
# evaluated last, after the brand palette it derives the chrome from.
theme:
light:
- html/chrome.scss
Expand Down Expand Up @@ -45,33 +84,4 @@ contributes:
- file: html/scripts/ordinal-dates.html
- file: html/scripts/a11y-fixes.html
- file: html/scripts/navbar-tooltips.html
project:
project:
type: website
output-dir: _site
website:
repo-actions:
- edit
- issue
repo-link-target: _blank
repo-link-rel: noopener noreferrer
open-graph:
locale: en_GB
twitter-card:
card-style: summary_large_image
page-navigation: true
back-to-top-navigation: true
llms-txt: true
search:
location: navbar
type: overlay
navbar:
search: true
page-footer:
border: true
left: |
Powered by [Quarto](https://quarto.org){target="_blank" rel="noopener noreferrer"}.
center: >
© []{#current-year} [MickaΓ«l CANOUIL](https://mickael.canouil.fr){target="_blank" rel="noopener
noreferrer"}.
format: atelier-html
source: mcanouil/quarto-atelier@0.10.2
44 changes: 43 additions & 1 deletion docs/_extensions/mcanouil/atelier/_modules/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ end
--- @param key string The metadata key to retrieve
--- @return string|nil The metadata value as a string, or nil if not found
--- @usage local repo = M.get_metadata_value(meta, "github", "repository-name")
--- @note A boolean `false` is a value, not an absence, so the test is against
--- `nil` rather than truthiness. Stringifying it yields "false", which is what
--- a caller comparing against the string form already expects.
function M.get_metadata_value(meta, extension_name, key)
if meta['extensions'] and meta['extensions'][extension_name] and meta['extensions'][extension_name][key] then
if meta['extensions'] and meta['extensions'][extension_name]
and meta['extensions'][extension_name][key] ~= nil then
return str.stringify(meta['extensions'][extension_name][key])
end
return nil
Expand Down Expand Up @@ -175,6 +179,44 @@ function M.get_options(spec)
return result
end

-- ============================================================================
-- PROJECT METADATA UTILITIES
-- ============================================================================

--- Get repo-url from Quarto project metadata via QUARTO_EXECUTE_INFO.
--- Reads the JSON file pointed to by the QUARTO_EXECUTE_INFO environment variable
--- and extracts repo-url from website or book metadata.
--- @return string|nil The repo-url value, or nil if not available
function M.get_project_repo_url()
local path = os.getenv("QUARTO_EXECUTE_INFO")
if not path then return nil end

local file = io.open(path, "r")
if not file then return nil end

local content = file:read("*a")
file:close()

if str.is_empty(content) then return nil end

local ok, info = pcall(quarto.json.decode, content)
if not ok or not info then return nil end

local format_meta = info["format"] and info["format"]["metadata"]
if not format_meta then return nil end

-- Try website.repo-url first, then book.repo-url
local repo_url = nil
if format_meta["website"] and format_meta["website"]["repo-url"] then
repo_url = format_meta["website"]["repo-url"]
elseif format_meta["book"] and format_meta["book"]["repo-url"] then
repo_url = format_meta["book"]["repo-url"]
end

if str.is_empty(repo_url) then return nil end
return repo_url
end

-- ============================================================================
-- MODULE EXPORT
-- ============================================================================
Expand Down
30 changes: 30 additions & 0 deletions docs/_extensions/mcanouil/atelier/html/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,36 @@ body.docked .sidebar-navigation {
--gitlink-widget-menu-fg: var(--atelier-sidebar-fg);
}

// Quarto gives the sidebar `overflow-y: auto` and leaves `overflow-x` at
// `visible`, which computes to `auto`, so anything wider than the column
// scrolls it sideways rather than being clipped. The widget's menu is anchored
// to its trigger's left edge and sized to its content, and the rules above
// centre the tools row, so the menu starts a third of the way in and runs past
// the right edge. It raises the scrollbar even while shut, because it is
// hidden with `visibility` and so still takes part in layout. Anchoring it to
// the tools row, which spans the column, keeps it inside.
//
// The marker class is the one widget.js sets on whichever tools container held
// the placeholder, so this follows the widget into either the main row or the
// collapsed one, which is where it lands when the project also has a navbar.
#quarto-sidebar .gitlink-widget-tools {
position: relative;
}

// The widget is `position: relative` in widget.css, so without this it stays
// the dropdown's containing block and the row below has no effect.
#quarto-sidebar .gitlink-widget-tools .gitlink-widget {
position: static;
}

// `width` has to give way with it: widget.css sizes the menu to `max-content`,
// and a specified width over-constrains the box, which drops `right`.
#quarto-sidebar .gitlink-widget-tools .gitlink-widget-dropdown {
left: 0;
right: 0;
width: auto;
}

// Structure ships with the extension's widget.css; match the radius of the
// navbar dropdown menus above.
body .navbar .gitlink-widget-dropdown {
Expand Down
7 changes: 3 additions & 4 deletions docs/_extensions/mcanouil/gitlink/_extension.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
title: gitlink
author: MickaΓ«l Canouil
version: 1.9.1
quarto-required: '>=1.8.21'
source: mcanouil/quarto-gitlink@1.9.1
source-type: registry
version: 1.9.2
quarto-required: ">=1.8.21"
contributes:
filters:
- gitlink.lua
source: mcanouil/quarto-gitlink@1.9.2
8 changes: 6 additions & 2 deletions docs/_extensions/mcanouil/gitlink/_modules/metadata.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- MC Metadata - Extension configuration and metadata access for Quarto Lua filters and shortcodes
--- @module metadata
--- @module "metadata"
--- @license MIT
--- @copyright 2026 MickaΓ«l Canouil
--- @author MickaΓ«l Canouil
Expand Down Expand Up @@ -42,8 +42,12 @@ end
--- @param key string The metadata key to retrieve
--- @return string|nil The metadata value as a string, or nil if not found
--- @usage local repo = M.get_metadata_value(meta, "github", "repository-name")
--- @note A boolean `false` is a value, not an absence, so the test is against
--- `nil` rather than truthiness. Stringifying it yields "false", which is what
--- a caller comparing against the string form already expects.
function M.get_metadata_value(meta, extension_name, key)
if meta['extensions'] and meta['extensions'][extension_name] and meta['extensions'][extension_name][key] then
if meta['extensions'] and meta['extensions'][extension_name]
and meta['extensions'][extension_name][key] ~= nil then
return str.stringify(meta['extensions'][extension_name][key])
end
return nil
Expand Down
5 changes: 2 additions & 3 deletions docs/_extensions/mcanouil/gitlink/gitlink.lua
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,8 @@ local function colour_to_hex(value)
end

--- Read a boolean metadata value with a default.
--- `get_metadata_value()` returns nil for boolean `false` (its truthy guard
--- treats false as missing), so this helper reads the raw value directly
--- and coerces it via `tostring`.
--- Reads the raw value rather than going through `get_metadata_value()`, so a
--- boolean, a quoted string, and a bare YAML `false` all resolve the same way.
--- @param gitlink_meta table|nil The `extensions.gitlink` metadata sub-table
--- @param key string The option key
--- @param default boolean The default when the option is absent
Expand Down
11 changes: 5 additions & 6 deletions docs/_extensions/mcanouil/iconify/_extension.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
title: Iconify
author: MickaΓ«l Canouil
version: 4.0.0
quarto-required: '>=1.5.57'
source: mcanouil/quarto-iconify@4.0.0
source-type: registry
version: 4.0.1
quarto-required: ">=1.5.57"
contributes:
filters:
- iconify-filter.lua
shortcodes:
- iconify.lua
filters:
- iconify-filter.lua
source: mcanouil/quarto-iconify@4.0.1
44 changes: 43 additions & 1 deletion docs/_extensions/mcanouil/iconify/_modules/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ end
--- @param key string The metadata key to retrieve
--- @return string|nil The metadata value as a string, or nil if not found
--- @usage local repo = M.get_metadata_value(meta, "github", "repository-name")
--- @note A boolean `false` is a value, not an absence, so the test is against
--- `nil` rather than truthiness. Stringifying it yields "false", which is what
--- a caller comparing against the string form already expects.
function M.get_metadata_value(meta, extension_name, key)
if meta['extensions'] and meta['extensions'][extension_name] and meta['extensions'][extension_name][key] then
if meta['extensions'] and meta['extensions'][extension_name]
and meta['extensions'][extension_name][key] ~= nil then
return str.stringify(meta['extensions'][extension_name][key])
end
return nil
Expand Down Expand Up @@ -175,6 +179,44 @@ function M.get_options(spec)
return result
end

-- ============================================================================
-- PROJECT METADATA UTILITIES
-- ============================================================================

--- Get repo-url from Quarto project metadata via QUARTO_EXECUTE_INFO.
--- Reads the JSON file pointed to by the QUARTO_EXECUTE_INFO environment variable
--- and extracts repo-url from website or book metadata.
--- @return string|nil The repo-url value, or nil if not available
function M.get_project_repo_url()
local path = os.getenv("QUARTO_EXECUTE_INFO")
if not path then return nil end

local file = io.open(path, "r")
if not file then return nil end

local content = file:read("*a")
file:close()

if str.is_empty(content) then return nil end

local ok, info = pcall(quarto.json.decode, content)
if not ok or not info then return nil end

local format_meta = info["format"] and info["format"]["metadata"]
if not format_meta then return nil end

-- Try website.repo-url first, then book.repo-url
local repo_url = nil
if format_meta["website"] and format_meta["website"]["repo-url"] then
repo_url = format_meta["website"]["repo-url"]
elseif format_meta["book"] and format_meta["book"]["repo-url"] then
repo_url = format_meta["book"]["repo-url"]
end

if str.is_empty(repo_url) then return nil end
return repo_url
end

-- ============================================================================
-- MODULE EXPORT
-- ============================================================================
Expand Down
9 changes: 5 additions & 4 deletions docs/_extensions/mcanouil/pastel/_extension.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
title: Pastel
author: MickaΓ«l Canouil
version: 0.1.0
quarto-required: '>=1.10.18'
source: mcanouil/quarto-pastel@0.1.0
source-type: registry
version: 0.1.1
# The Quarto version the brand and its stylesheet are developed and verified
# against. quarto-atelier, which these sites are built on, requires >=1.9.36.
quarto-required: ">=1.10.18"
contributes:
metadata:
project:
brand: brand.yml
source: mcanouil/quarto-pastel@0.1.1