From a0fde308697d3f5460e75bdb79118a1f6bfb6e78 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 08:03:37 +0000 Subject: [PATCH] Update `make docs` procedure (#7113) Co-authored-by: grafanabot --- docs/docs.mk | 7 ++++--- docs/make-docs | 12 ++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/docs/docs.mk b/docs/docs.mk index 46b2afb65476..dfb6e9e501cf 100644 --- a/docs/docs.mk +++ b/docs/docs.mk @@ -121,10 +121,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/make-docs chmod +x make-docs -.PHONY: topic/% +# ls static/templates/ | sed 's/-template\.md//' | xargs +TOPIC_TYPES := concept multiple-tasks reference section task tutorial visualization +.PHONY: $(patsubst %,topic/%,$(TOPIC_TYPES)) 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")) + $(if $(TOPIC_PATH),,$(error "You must set the TOPIC_PATH variable to the path where the $(@F) 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 diff --git a/docs/make-docs b/docs/make-docs index e8111479d7c0..80c89aea7ced 100755 --- a/docs/make-docs +++ b/docs/make-docs @@ -8,6 +8,18 @@ # [Semantic versioning](https://semver.org/) is used to help the reader identify the significance of changes. # Changes are relevant to this script and the support docs.mk GNU Make interface. # +# ## 8.5.1 (2025-02-18) +# +# ### Fixed +# +# - PHONY declaration for topic/ targets. +# +# ## 8.5.0 (2025-02-13) +# +# ### Added +# +# - make topic/ TOPIC_PATH= target to create a new topic from the Writers' Toolkit templates. +# # ## 8.4.0 (2025-01-27) # # ### Fixed