Skip to content

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

Revert "docs(config): add H1 major sections with TOC support (#857)"

Maximilian Roos400f22d2c060
diff --git a/.claude-plugin/skills/worktrunk/reference/config.md b/.claude-plugin/skills/worktrunk/reference/config.md
index 0d1a4a510..1f54c15a6 100644
--- a/.claude-plugin/skills/worktrunk/reference/config.md
+++ b/.claude-plugin/skills/worktrunk/reference/config.md
@@ -59,7 +59,7 @@ test = "npm test"
---
<!-- USER_CONFIG_START -->
-# User Configuration
+## Worktrunk User Configuration
Create with `wt config create`.
@@ -105,7 +105,7 @@ Generate commit messages automatically during merge. Requires an external CLI to
See [LLM commits docs](https://worktrunk.dev/llm-commits/) for setup and [Custom prompt templates](#custom-prompt-templates) for template customization.
-## Command config
+## Commands
### List
@@ -280,7 +280,7 @@ Combine these commits into a single commit message.
---
-# Project Configuration
+## Project configuration
Project config (`.config/wt.toml`) defines lifecycle hooks and project-specific settings. This file is checked into version control and shared with the team. Create with `wt config create --project`.
@@ -302,7 +302,7 @@ platform = "github" # or "gitlab"
---
-# Shell Integration
+## Shell integration
Worktrunk needs shell integration to change directories when switching worktrees. Install with:
@@ -339,8 +339,6 @@ Or via environment variable:
export WORKTRUNK_SKIP_SHELL_INTEGRATION_PROMPT=true
```
-# Other
-
## Environment variables
All user config options can be overridden with environment variables using the `WORKTRUNK_` prefix.
@@ -407,8 +405,6 @@ Usage: <b><span class=c>wt config</span></b> <span class=c>[OPTIONS]</span> <spa
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: hooks, templates; -vv: debug report)
-# Subcommands
-
## wt config show
Show configuration files & locations.
diff --git a/.claude-plugin/skills/worktrunk/reference/hook.md b/.claude-plugin/skills/worktrunk/reference/hook.md
index 449e51634..4d74c45e0 100644
--- a/.claude-plugin/skills/worktrunk/reference/hook.md
+++ b/.claude-plugin/skills/worktrunk/reference/hook.md
@@ -429,8 +429,6 @@ Usage: <b><span class=c>wt hook</span></b> <span class=c>[OPTIONS]</span> <span
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: hooks, templates; -vv: debug report)
-# Subcommands
-
## wt hook approvals
Manage command approvals.
diff --git a/.claude-plugin/skills/worktrunk/reference/step.md b/.claude-plugin/skills/worktrunk/reference/step.md
index 256562b03..77cee4f40 100644
--- a/.claude-plugin/skills/worktrunk/reference/step.md
+++ b/.claude-plugin/skills/worktrunk/reference/step.md
@@ -60,8 +60,6 @@ Usage: <b><span class=c>wt step</span></b> <span class=c>[OPTIONS]</span> <span
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: hooks, templates; -vv: debug report)
-# Subcommands
-
## wt step commit
Stage and commit with LLM-generated message.
diff --git a/dev/config.example.toml b/dev/config.example.toml
index 49abff16e..1d382e644 100644
--- a/dev/config.example.toml
+++ b/dev/config.example.toml
@@ -1,4 +1,4 @@
-# # User Configuration
+# ## Worktrunk User Configuration
#
# Create with `wt config create`.
#
@@ -42,7 +42,7 @@
#
# See LLM commits docs (https://worktrunk.dev/llm-commits/) for setup and Custom prompt templates (#custom-prompt-templates) for template customization.
#
-# ## Command config
+# ## Commands
#
# ### List
#
diff --git a/docs/content/config.md b/docs/content/config.md
index 7d7400945..b55dd4c17 100644
--- a/docs/content/config.md
+++ b/docs/content/config.md
@@ -67,7 +67,7 @@ test = "npm test"
---
<!-- USER_CONFIG_START -->
-# User Configuration
+## Worktrunk User Configuration
Create with `wt config create`.
@@ -113,7 +113,7 @@ Generate commit messages automatically during merge. Requires an external CLI to
See [LLM commits docs](@/llm-commits.md) for setup and [Custom prompt templates](#custom-prompt-templates) for template customization.
-## Command config
+## Commands
### List
@@ -288,7 +288,7 @@ Combine these commits into a single commit message.
---
-# Project Configuration
+## Project configuration
Project config (`.config/wt.toml`) defines lifecycle hooks and project-specific settings. This file is checked into version control and shared with the team. Create with `wt config create --project`.
@@ -310,7 +310,7 @@ platform = "github" # or "gitlab"
---
-# Shell Integration
+## Shell integration
Worktrunk needs shell integration to change directories when switching worktrees. Install with:
@@ -347,8 +347,6 @@ Or via environment variable:
export WORKTRUNK_SKIP_SHELL_INTEGRATION_PROMPT=true
```
-# Other
-
## Environment variables
All user config options can be overridden with environment variables using the `WORKTRUNK_` prefix.
@@ -417,8 +415,6 @@ Usage: <b><span class=c>wt config</span></b> <span class=c>[OPTIONS]</span> <spa
Verbose output (-v: hooks, templates; -vv: debug report)
{% end %}
-# Subcommands
-
## wt config show
Show configuration files & locations.
diff --git a/docs/content/hook.md b/docs/content/hook.md
index ae2a09a62..bf9eec0ba 100644
--- a/docs/content/hook.md
+++ b/docs/content/hook.md
@@ -446,8 +446,6 @@ Usage: <b><span class=c>wt hook</span></b> <span class=c>[OPTIONS]</span> <span
Verbose output (-v: hooks, templates; -vv: debug report)
{% end %}
-# Subcommands
-
## wt hook approvals
Manage command approvals.
diff --git a/docs/content/step.md b/docs/content/step.md
index 46f04e9f8..cc13eb6c8 100644
--- a/docs/content/step.md
+++ b/docs/content/step.md
@@ -75,8 +75,6 @@ Usage: <b><span class=c>wt step</span></b> <span class=c>[OPTIONS]</span> <span
Verbose output (-v: hooks, templates; -vv: debug report)
{% end %}
-# Subcommands
-
## wt step commit
Stage and commit with LLM-generated message.
diff --git a/docs/sass/custom.scss b/docs/sass/custom.scss
index 7993cae0a..54f16d8ea 100644
--- a/docs/sass/custom.scss
+++ b/docs/sass/custom.scss
@@ -52,34 +52,11 @@ h1, h2, h3, h4, h5, h6 {
}
h1 {
- font-size: 1.5rem;
+ font-size: 1.75rem;
font-weight: 650;
letter-spacing: -0.02em;
- margin-top: 2rem;
+ margin-top: 0;
margin-bottom: 0.5rem;
- position: relative;
- width: fit-content; // Block-level but sized to content (for underline effect)
-
- // Same underline treatment as h2
- > a {
- &::after {
- content: "";
- position: absolute;
- left: 0;
- bottom: -0.3rem;
- width: 45%;
- height: 2px;
- background: var(--wt-color-craft-brown);
- opacity: 0.5;
- border-radius: 1px;
- transition: background 150ms ease-out, opacity 150ms ease-out;
- }
-
- &:hover::after {
- background: var(--wt-color-accent);
- opacity: 1;
- }
- }
}
h2 {
@@ -130,7 +107,6 @@ h4 {
// Heading anchor links - entire heading is clickable
// .heading-anchor = custom anchors in templates, .zola-anchor = Zola-generated
h1 > a.heading-anchor,
-h1 > a.zola-anchor,
h2 > a.zola-anchor,
h3 > a.zola-anchor,
h4 > a.zola-anchor {
@@ -720,7 +696,7 @@ main {
}
.toc-item-child {
- padding: 0 0.45rem 0.15rem 1rem;
+ padding: 0 0.45rem 0.2rem 1rem;
margin: 0 0.4rem;
a {
@@ -744,31 +720,6 @@ main {
font-size: 0.7rem;
}
}
-
- // H1 entries in TOC - section markers
- // Left border provides visual grouping
- &.toc-h1 {
- margin-top: 0.35rem;
- padding-left: 0.65rem;
-
- a {
- font-weight: 550;
- font-size: 0.75rem;
- color: var(--wt-color-text-muted);
- border-left: 2px solid var(--wt-color-border-subtle);
- padding-left: 0.35rem;
-
- &:hover {
- color: var(--wt-color-text);
- background: var(--wt-color-bg-soft);
- }
- }
- }
-
- // H2s under H1s - same alignment as standalone H2s
- &.toc-h2-under-h1 {
- // No extra indent - aligns with standalone H2s
- }
}
// ============================================================================
diff --git a/docs/templates/macros.html b/docs/templates/macros.html
index efbfbe7b5..66a636b8e 100644
--- a/docs/templates/macros.html
+++ b/docs/templates/macros.html
@@ -18,27 +18,10 @@
</a>
</div>
- {# Show page TOC for current page (h1s with nested h2s, or standalone h2s) #}
+ {# Show page TOC for current page (h2s only) #}
{% if is_current and current_page.toc %}
{% for h in current_page.toc %}
- {% if h.level == 1 %}
- <div class="toc-item-child toc-h1">
- <a class="subtext" href="{{ h.permalink | safe }}">
- <small>{{ h.title }}</small>
- </a>
- </div>
- {# Show H2 children nested under this H1 #}
- {% for child in h.children | default(value=[]) %}
- {% if child.level == 2 %}
- <div class="toc-item-child toc-h2-under-h1">
- <a class="subtext" href="{{ child.permalink | safe }}">
- <small>{{ child.title }}</small>
- </a>
- </div>
- {% endif %}
- {% endfor %}
- {% elif h.level == 2 %}
- {# Standalone H2s (before any H1) #}
+ {% if h.level == 2 %}
<div class="toc-item-child">
<a class="subtext" href="{{ h.permalink | safe }}">
<small>{{ h.title }}</small>
diff --git a/src/cli/mod.rs b/src/cli/mod.rs
index 16fa716b5..6d8160eb6 100644
--- a/src/cli/mod.rs
+++ b/src/cli/mod.rs
@@ -1507,7 +1507,7 @@ test = "npm test"
---
<!-- USER_CONFIG_START -->
-# User Configuration
+## Worktrunk User Configuration
Create with `wt config create`.
@@ -1553,7 +1553,7 @@ Generate commit messages automatically during merge. Requires an external CLI to
See [LLM commits docs](@/llm-commits.md) for setup and [Custom prompt templates](#custom-prompt-templates) for template customization.
-## Command config
+## Commands
### List
@@ -1728,7 +1728,7 @@ Combine these commits into a single commit message.
---
-# Project Configuration
+## Project configuration
Project config (`.config/wt.toml`) defines lifecycle hooks and project-specific settings. This file is checked into version control and shared with the team. Create with `wt config create --project`.
@@ -1750,7 +1750,7 @@ platform = "github" # or "gitlab"
---
-# Shell Integration
+## Shell integration
Worktrunk needs shell integration to change directories when switching worktrees. Install with:
@@ -1787,8 +1787,6 @@ Or via environment variable:
export WORKTRUNK_SKIP_SHELL_INTEGRATION_PROMPT=true
```
-# Other
-
## Environment variables
All user config options can be overridden with environment variables using the `WORKTRUNK_` prefix.
diff --git a/src/help.rs b/src/help.rs
index 5c69d51a5..8d1d87234 100644
--- a/src/help.rs
+++ b/src/help.rs
@@ -301,8 +301,6 @@ Commands with pages: merge, switch, remove, list"
let subdocs_expanded = expand_subdoc_placeholders(subdocs, sub, &parent_name);
let subdocs_processed = colorize_ci_status_for_html(&subdocs_expanded);
std::println!();
- std::println!("# Subcommands");
- std::println!();
std::println!("{}", subdocs_processed.trim());
}
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 453bfc924..31c21b669 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_create.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_create.snap
@@ -50,7 +50,7 @@ Usage: wt config create [OPTIONS]
Creates ~/.config/worktrunk/config.toml with the following content:
- # # User Configuration
+ # ## Worktrunk User Configuration
#
# Create with `wt config create`.
#
@@ -94,7 +94,7 @@ Creates ~/.config/worktrunk/config.toml with the following content:
#
# See LLM commits docs (https://worktrunk.dev/llm-commits/) for setup and Custom prompt templates (#custom-prompt-templates) for template customization.
#
- # ## Command config
+ # ## Commands
#
# ### List
#
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_long.snap b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
index 132ca2878..e5f801b1a 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
@@ -94,7 +94,7 @@ Show current configuration and file locations:
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
-USER CONFIGURATION
+Worktrunk User Configuration
Create with wt config create.
@@ -138,7 +138,7 @@ Generate commit messages automatically during merge. Requires an external CLI to
See LLM commits docs for setup and Custom prompt templates for template customization.
-Command config
+Commands
List
@@ -292,7 +292,7 @@ Default template:
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
-PROJECT CONFIGURATION
+Project configuration
Project config (.config/wt.toml) defines lifecycle hooks and project-specific settings. This file is checked into version control and shared with the team. Create with wt config create --project.
@@ -312,7 +312,7 @@ See wt hook for hook types, execution order, template variables, and exa
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
-SHELL INTEGRATION
+Shell integration
Worktrunk needs shell integration to change directories when switching worktrees. Install with:
@@ -341,8 +341,6 @@ Or via environment variable:
export WORKTRUNK_SKIP_SHELL_INTEGRATION_PROMPT=true
-OTHER
-
Environment variables
All user config options can be overridden with environment variables using the WORKTRUNK_ prefix.