Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

fix(docs): correct broken worktrunk.dev URLs in templates (#882)

Maximilian Roos3d69cec1a725
diff --git a/.config/lychee.toml b/.config/lychee.toml
index 84f811491..6094ed844 100644
--- a/.config/lychee.toml
+++ b/.config/lychee.toml
@@ -45,7 +45,6 @@ exclude = [
"npmjs\\.com",
"incident\\.io",
"git-scm\\.com",
- "worktrunk\\.dev",
# Package registries and badges (frequently return 429 or block CI)
"crates\\.io",
diff --git a/dev/config.example.toml b/dev/config.example.toml
index b6a7ce830..7702599ad 100644
--- a/dev/config.example.toml
+++ b/dev/config.example.toml
@@ -85,7 +85,7 @@
#
# For context:
#
-# - Project config (https://worktrunk.dev/config.md#project-configuration/) settings are shared with teammates.
+# - Project config (https://worktrunk.dev/config/#project-configuration) settings are shared with teammates.
# - User configs generally apply to all projects.
# - User configs _also_ has a `[projects]` table which holds project-specific settings for the user, such as approved hook commands and worktree layout. That's what this section covers.
#
diff --git a/templates/fish_wrapper.fish b/templates/fish_wrapper.fish
index 72a7a37c3..a12ecc980 100644
--- a/templates/fish_wrapper.fish
+++ b/templates/fish_wrapper.fish
@@ -1,6 +1,6 @@
# worktrunk shell integration for fish
# Sources full integration from binary on first use.
-# Docs: https://worktrunk.dev/docs/shell-integration
+# Docs: https://worktrunk.dev/config/#shell-integration
# Check: {{ cmd }} config show | Uninstall: {{ cmd }} config shell uninstall
function {{ cmd }}
diff --git a/tests/integration_tests/readme_sync.rs b/tests/integration_tests/readme_sync.rs
index e83163d26..6bca790c9 100644
--- a/tests/integration_tests/readme_sync.rs
+++ b/tests/integration_tests/readme_sync.rs
@@ -978,8 +978,15 @@ fn convert_markdown_links_for_config(line: &str) -> String {
// Convert Zola @/ links to full URLs
let url = if let Some(path) = url.strip_prefix("@/") {
- let page = path.trim_end_matches(".md");
- format!("https://worktrunk.dev/{page}/")
+ // Handle anchors: @/config.md#section → config/#section
+ let (page, anchor) = match path.split_once('#') {
+ Some((p, a)) => (p.trim_end_matches(".md"), Some(a)),
+ None => (path.trim_end_matches(".md"), None),
+ };
+ match anchor {
+ Some(a) => format!("https://worktrunk.dev/{page}/#{a}"),
+ None => format!("https://worktrunk.dev/{page}/"),
+ }
} else {
url.to_string()
};
diff --git a/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_fish_dry_run.snap b/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_fish_dry_run.snap
index 9d8a7ec14..5fc7ef0ca 100644
--- a/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_fish_dry_run.snap
+++ b/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_fish_dry_run.snap
@@ -41,7 +41,7 @@ exit_code: 0
○ Will create shell extension for fish @ ~/.config/fish/functions/wt.fish
  # worktrunk shell integration for fish
  # Sources full integration from binary on first use.
-  # Docs: https://worktrunk.dev/docs/shell-integration
+  # Docs: https://worktrunk.dev/config/#shell-integration
  # Check: wt config show | Uninstall: wt config shell uninstall
  
  function wt
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_create.snap b/tests/snapshots/integration__integration_tests__help__help_config_create.snap
index 0abc3f326..ad48ec0bc 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_create.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_create.snap
@@ -137,7 +137,7 @@ Creates ~/.config/worktrunk/config.toml with the following content:
#
# For context:
#
- # - Project config (https://worktrunk.dev/config.md#project-configuration/) settings are shared with teammates.
+ # - Project config (https://worktrunk.dev/config/#project-configuration) settings are shared with teammates.
# - User configs generally apply to all projects.
# - User configs _also_ has a `[projects]` table which holds project-specific settings for the user, such as approved hook commands and worktree layout. That's what this section covers.
#