From 9150e33765df96cda33fcc7ab7aab9ba00d9fc5d Mon Sep 17 00:00:00 2001 From: Lucas Beyer Date: Mon, 17 Apr 2017 22:35:02 +0200 Subject: [PATCH] Add support for creating docsets. (#1276) Docsets are an offline documentation format introduced by Dash.app and supported by Zeal and some other open-source clones. --- docs/Makefile | 9 ++++- .../source/_static/img/pytorch-logo-flame.png | Bin 0 -> 1010 bytes .../source/_static/img/pytorch-logo-flame.svg | 33 ++++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 docs/source/_static/img/pytorch-logo-flame.png create mode 100644 docs/source/_static/img/pytorch-logo-flame.svg diff --git a/docs/Makefile b/docs/Makefile index a232e6b5f5f..71e359aa8bc 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -12,7 +12,14 @@ BUILDDIR = build help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -.PHONY: help Makefile +docset: html + doc2dash --name $(SPHINXPROJ) --icon $(SOURCEDIR)/_static/img/pytorch-logo-flame.png --enable-js --online-redirect-url http://pytorch.org/docs/ --force $(BUILDDIR)/html/ + + # Manually fix because Zeal doesn't deal well with `icon.png`-only at 2x resolution. + cp $(SPHINXPROJ).docset/icon.png $(SPHINXPROJ).docset/icon@2x.png + convert $(SPHINXPROJ).docset/icon@2x.png -resize 16x16 $(SPHINXPROJ).docset/icon.png + +.PHONY: help Makefile docset # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). diff --git a/docs/source/_static/img/pytorch-logo-flame.png b/docs/source/_static/img/pytorch-logo-flame.png new file mode 100644 index 0000000000000000000000000000000000000000..370633f2ec2b7cf35a37a283095229de337f46e4 GIT binary patch literal 1010 zcmV3glQ%A$r$!ato85yx2xcuN% zU{ge`&4p|qlJ;swtf%e@ zz;DiuCXiGGsD7_D<0S3;U{}qPsR^JZGPf6Kt+3T~BeSj3Wf;+SQMowdBp+KffJ);p zMZ`p2D?R5k-A|xA3q&nT$F#2_8t5IAa6Of5Zf@3TV4Y8jL3kc0p!y!j`W16|!OrH6 z-w{B5ATfZD4a%z&s!aZ=(f0c%zPja?Q^QXnPCdHVXBXQeMF7(i7jjn9CbP_YuWX>YWrVvU07QQ<=$m^IO+ zTf6*v_#Q?#h8~TvFyH5q7eO-dY;Iy{`CUo>7C1CJm^dfONjxvNDoM%?uJZ7mK*PfA zeZX3e{Ps%o|HeJzmre)^*H-L!C3O)@D5R368;2NExZx+*u z{eCrtbYe*1C0C6yX=}%MznZG2;mklHWeJ~n~p!2hn)}dc +image/svg+xml \ No newline at end of file