From 9b9af380fb46d467a07bf4041333d7ca7b9ddf60 Mon Sep 17 00:00:00 2001 From: AnnsAnn Date: Mon, 13 Oct 2025 11:20:02 +0200 Subject: [PATCH 1/2] doc/starlight: Add temporary workaround to symlink issue See: https://github.com/withastro/starlight/issues/3470 --- doc/starlight/.gitignore | 4 +++- doc/starlight/Makefile | 7 +++++++ doc/starlight/src/content/docs | 1 - 3 files changed, 10 insertions(+), 2 deletions(-) delete mode 120000 doc/starlight/src/content/docs diff --git a/doc/starlight/.gitignore b/doc/starlight/.gitignore index 6240da8b10bf..7779afa0796b 100644 --- a/doc/starlight/.gitignore +++ b/doc/starlight/.gitignore @@ -12,10 +12,12 @@ yarn-debug.log* yarn-error.log* pnpm-debug.log* - # environment variables .env .env.production # macOS-specific files .DS_Store + +# Don't show copied files +src/content/docs/** diff --git a/doc/starlight/Makefile b/doc/starlight/Makefile index 806bf4afe563..1cd862b59392 100644 --- a/doc/starlight/Makefile +++ b/doc/starlight/Makefile @@ -10,11 +10,18 @@ install: integrate_outside_files .PHONY: build build: install + @echo "Copying RIOT documentation source files..." + @echo "See: https://github.com/withastro/starlight/issues/3470" + @rm -rf $(CURDIR)/src/content/docs + @cp -r $(RIOTBASE)/doc/guides $(CURDIR)/src/content/docs @npm run build --prefix $(CURDIR) @echo "RIOT documentation successfully generated at file://$(RIOTBASE)/doc/starlight/dist/index.html" .PHONY: dev dev: install + @echo "Linking RIOT documentation source files..." + @rm -rf $(CURDIR)/src/content/docs + @ln -s ../../../guides $(CURDIR)/src/content/docs @echo "Starting starlight live server..." @npm run dev --prefix $(CURDIR) diff --git a/doc/starlight/src/content/docs b/doc/starlight/src/content/docs deleted file mode 120000 index 7753a31237d7..000000000000 --- a/doc/starlight/src/content/docs +++ /dev/null @@ -1 +0,0 @@ -../../../guides \ No newline at end of file From 306f6141cb29c86e8aae89556fa8b2003295a2b5 Mon Sep 17 00:00:00 2001 From: AnnsAnn Date: Mon, 13 Oct 2025 11:36:10 +0200 Subject: [PATCH 2/2] doc/starlight: add preview command --- doc/starlight/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/starlight/Makefile b/doc/starlight/Makefile index 1cd862b59392..c53a5816aa8f 100644 --- a/doc/starlight/Makefile +++ b/doc/starlight/Makefile @@ -17,6 +17,10 @@ build: install @npm run build --prefix $(CURDIR) @echo "RIOT documentation successfully generated at file://$(RIOTBASE)/doc/starlight/dist/index.html" +.PHONY: preview +preview: build + @npm run preview --prefix $(CURDIR) + .PHONY: dev dev: install @echo "Linking RIOT documentation source files..."