From 273e52b04cf6e45c2226bc5b26aba914b426922a Mon Sep 17 00:00:00 2001 From: n-peugnet Date: Fri, 29 Apr 2022 13:28:33 +0200 Subject: feat: add very basic index template It based on nginx's one, with the meta viewport added, as it is not there by default (see https://mailman.nginx.org/pipermail/nginx-devel/2020-November/013609.html) It could be customized later. --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 364fdf9..fd942d5 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,7 @@ SPHINXLBUILDERS := $(foreach b,$(SPHINXBUILDERS),$(LANGUAGES:%=$b/%)) SPHINXCMDS := gettext changes xml pseudoxml linkcheck SOURCEDIR := . BUILDDIR := _build +DIRS := $(SPHINXBUILDERS:%=$(BUILDDIR)/%) PUBHOST ?= club1.fr PUBDIR ?= /var/www/docs @@ -32,6 +33,9 @@ help: .PHONY: help clean update-po latexpdf info publish $(SPHINXBUILDERS) $(SPHINXLBUILDERS) $(SPHINXCMDS) +$(DIRS): + mkdir -p $@ + update-po: $(LOCALEFILES); %.mo: %.po @@ -57,11 +61,16 @@ $(LANGUAGES:%=latexpdf/%): latexpdf/%: latex/% $(LANGUAGES:%=info/%): info/%: texinfo/% $(MAKE) -C $(BUILDDIR)/$< +$(BUILDDIR)/html/index.html: _templates/index.html | $(BUILDDIR)/html + cp $< $@ + publish: rsync -av --del --exclude='.*' _build/html/ $(USER)@$(PUBHOST):$(PUBDIR) # Shinx builders that builds localized versions. -$(SPHINXBUILDERS): %: $(LANGUAGES:%=\%/%); +$(filter-out html,$(SPHINXBUILDERS)): %: $(LANGUAGES:%=\%/%); + +html: $(LANGUAGES:%=html/%) $(BUILDDIR)/html/index.html # Localized Sphinx builders .SECONDEXPANSION: -- cgit v1.2.3