Skip to content

Commit b2fac52

Browse files
fix: update workflow to handle Obsidian vault structure for MkDocs
- Remove docs_dir from mkdocs.yml - Add step to copy files to docs directory during build - This works around MkDocs limitation with root-level documentation
1 parent 3ab99cb commit b2fac52

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ jobs:
5050
- name: Install project
5151
run: poetry install --no-interaction --no-root
5252

53+
- name: Prepare docs directory
54+
run: |
55+
mkdir -p docs
56+
# Copy all markdown files and directories except hidden ones
57+
find . -maxdepth 1 \( -type f -name "*.md" -o -type d ! -name ".*" ! -name "docs" ! -name "site" ! -name "overrides" \) -exec cp -r {} docs/ \;
58+
# Copy the overrides directory to the root where mkdocs.yml expects it
59+
cp -r overrides .
60+
5361
- name: Build site
5462
run: poetry run mkdocs build
5563

mkdocs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ site_url: https://offendingcommit.github.io/valdris/
44
repo_url: https://github.com/offendingcommit/valdris
55
repo_name: offendingcommit/valdris
66
edit_uri: edit/main/
7-
docs_dir: .
87

98
theme:
109
name: material

0 commit comments

Comments
 (0)