Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
doc/starlight: Add temporary workaround to symlink issue
  • Loading branch information
AnnsAnns committed Oct 13, 2025
commit 9b9af380fb46d467a07bf4041333d7ca7b9ddf60
4 changes: 3 additions & 1 deletion doc/starlight/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/**
7 changes: 7 additions & 0 deletions doc/starlight/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not copy as well? If I see it correct, this means that dev would still have broken :::note blocks right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The big disadvantage would be no hot-reloading, I'd rather have no note blocks than starlight function like doxygen

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add a dev-build-preview that uses npm run preview on the deployment version that was generated using make build

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair I think a make preview command is enough

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a make preview command

@echo "Starting starlight live server..."
@npm run dev --prefix $(CURDIR)

Expand Down
1 change: 0 additions & 1 deletion doc/starlight/src/content/docs

This file was deleted.