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..c53a5816aa8f 100644 --- a/doc/starlight/Makefile +++ b/doc/starlight/Makefile @@ -10,11 +10,22 @@ 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: preview +preview: build + @npm run preview --prefix $(CURDIR) + .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