diff --git a/Makefile b/Makefile index c7044a9..7650ff2 100644 --- a/Makefile +++ b/Makefile @@ -13,19 +13,19 @@ OTHERLANGS = en ALLLANGS = $(SOURCELANG) $(OTHERLANGS) BASEURL = "kujiu.eu" -all: translation htmlall geminiall +all: translation html gemini epub weasyprint pyppeteer clean: rm -rf "$(BUILDDIR)" translation: - $(SPHINXBUILD) --color -d "$(BUILDDIR)/doctrees" -b gettext $(SPHINXOPTS) "$(SOURCEDIR)" "$(BUILDDIR)/gettext"; \ + $(SPHINXBUILD) --color -b gettext $(SPHINXOPTS) "$(SOURCEDIR)" "$(BUILDDIR)/gettext"; \ for lang in $(OTHERLANGS); \ do \ $(SPHINXINTL) update -p "$(BUILDDIR)/gettext" -l $$lang; \ done -htmlall: +html: mkdir -p "$(BUILDDIR)/html"; \ for lang in $(ALLLANGS); \ do \ @@ -37,7 +37,7 @@ htmlall: cp $(DISTDIR)/html/$(SOURCELANG)/robots.txt $(DISTDIR)/html/ cp $(DISTDIR)/html/$(SOURCELANG)/google82f190054a773ed9.html $(DISTDIR)/html/ -geminiall: +gemini: mkdir -p "$(BUILDDIR)/gemini"; \ for lang in $(ALLLANGS); \ do \ @@ -46,3 +46,30 @@ geminiall: rsync -av --delete "$(BUILDDIR)/gemini/$$lang/" "$(DISTDIR)/gemini/$$lang"; \ done cp index.gmi $(DISTDIR)/gemini/index.gmi + +pyppeteer: + mkdir -p "$(BUILDDIR)/pyppeteer"; \ + for lang in $(ALLLANGS); \ + do \ + mkdir -p "$(DISTDIR)/pyppeteer/$$lang"; \ + $(SPHINXBUILD) --color -d "$(BUILDDIR)/doctrees" -b pyppeteer -D language="$$lang" -D blog_baseurl="pyppeteer://$(BASEURL)/$$lang/" -D pyppeteer_baseurl="pyppeteer://$(BASEURL)/$$lang/" $(SPHINXOPTS) "$(SOURCEDIR)" "$(BUILDDIR)/pyppeteer/$$lang"; \ + rsync -av --delete "$(BUILDDIR)/pyppeteer/$$lang/" "$(DISTDIR)/pyppeteer/$$lang"; \ + done + +weasyprint: + mkdir -p "$(BUILDDIR)/weasyprint"; \ + for lang in $(ALLLANGS); \ + do \ + mkdir -p "$(DISTDIR)/weasyprint/$$lang"; \ + $(SPHINXBUILD) --color -d "$(BUILDDIR)/doctrees" -b weasyprint -D language="$$lang" -D blog_baseurl="weasyprint://$(BASEURL)/$$lang/" -D weasyprint_baseurl="weasyprint://$(BASEURL)/$$lang/" $(SPHINXOPTS) "$(SOURCEDIR)" "$(BUILDDIR)/weasyprint/$$lang"; \ + rsync -av --delete "$(BUILDDIR)/weasyprint/$$lang/" "$(DISTDIR)/weasyprint/$$lang"; \ + done + +epub: + mkdir -p "$(BUILDDIR)/epub"; \ + for lang in $(ALLLANGS); \ + do \ + mkdir -p "$(DISTDIR)/epub/$$lang"; \ + $(SPHINXBUILD) --color -d "$(BUILDDIR)/doctrees" -b epub -D language="$$lang" -D blog_baseurl="epub://$(BASEURL)/$$lang/" -D epub_baseurl="epub://$(BASEURL)/$$lang/" $(SPHINXOPTS) "$(SOURCEDIR)" "$(BUILDDIR)/epub/$$lang"; \ + rsync -av --delete "$(BUILDDIR)/epub/$$lang/" "$(DISTDIR)/epub/$$lang"; \ + done diff --git a/source/_static/robots.txt b/source/_static/robots.txt index 0299c11..f55319e 100644 --- a/source/_static/robots.txt +++ b/source/_static/robots.txt @@ -2,3 +2,35 @@ User-agent: * Disallow: User-agent: GPTBot Disallow: / +User-agent: ChatGPT-User +Disallow: / +User-agent: Google-Extended +Disallow: / +User-agent: PerplexityBot +Disallow: / +User-agent: Amazonbot +Disallow: / +User-agent: ClaudeBot +Disallow: / +User-agent: Omgilibot +Disallow: / +User-Agent: FacebookBot +Disallow: / +User-Agent: Applebot +Disallow: / +User-agent: anthropic-ai +Disallow: / +User-agent: Bytespider +Disallow: / +User-agent: Claude-Web +Disallow: / +User-agent: Diffbot +Disallow: / +User-agent: ImagesiftBot +Disallow: / +User-agent: Omgilibot +Disallow: / +User-agent: Omgili +Disallow: / +User-agent: YouBot +Disallow: /