Skip to content

Commit

Permalink
Update make docs procedure (#3896)
Browse files Browse the repository at this point in the history
Co-authored-by: grafanabot <[email protected]>
Co-authored-by: Jack Baldry <[email protected]>
  • Loading branch information
3 people authored Feb 7, 2025
1 parent 0de034c commit 886b418
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/docs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,11 @@ update: ## Fetch the latest version of this Makefile and the `make-docs` script
curl -s -LO https://raw.githubusercontent.com/grafana/writers-toolkit/main/docs/docs.mk
curl -s -LO https://raw.githubusercontent.com/grafana/writers-toolkit/main/docs/make-docs
chmod +x make-docs

.PHONY: topic/%
topic/%: ## Create a topic from the Writers' Toolkit template. Specify the topic type as the target, for example, `make topic/task TOPIC_PATH=sources/my-new-topic.md`.
topic/%:
$(if $(TOPIC_PATH),,$(error "You must set the TOPIC_PATH variable to the path where the $(@) topic will be created.
For example: make $(@) TOPIC_PATH=sources/my-new-topic.md"))
mkdir -p $(dir $(TOPIC_PATH))
curl -s -o $(TOPIC_PATH) https://raw.githubusercontent.com/grafana/writers-toolkit/refs/heads/main/docs/static/templates/$(@F)-template.md

0 comments on commit 886b418

Please sign in to comment.