Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to hugo and Scientific Python theme #94

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ gh-pages
*.pyc
*~
\.#*

.hugo_build.lock
/resources/_gen/
/public/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "themes/scientific-python-hugo-theme"]
path = themes/scientific-python-hugo-theme
url = https://github.com/scientific-python/scientific-python-hugo-theme.git
91 changes: 28 additions & 63 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,66 +1,31 @@
# Makefile for building a website using sphinx.
# This Makefile has been heavily modified from the original that
# sphinx-quickstart automatically creates

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
BUILDDIR = _build
SOURCEDIR = .

# Other variables for site management, css updating, etc.
STATICDIR = _static
STATIC_CSS = themes/agogo/static

# Internal variables.
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(SPHINXOPTS) $(SOURCEDIR)

.PHONY: help clean html site linkcheck doctest upload dist

default: site
.PHONY: help themes html serve clean
.DEFAULT_GOAL := help

help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html : make standalone HTML files"
@echo " linkcheck: check all external links for integrity"
@echo " doctest : run all doctests embedded in the documentation (if enabled)"
@echo " upload : push the local site build to its public location"
@echo " dist : create a tarball (no .git dir) of site"

@grep ": ##" Makefile | grep -v grep | tr -d '#'

themes/scientific-python-hugo-theme:
@if [ ! -d "$<" ]; then \
echo "*** ERROR: missing theme" ; \
echo ; \
echo "It looks as though you are missing the themes directory."; \
echo "You need to add the scientific-python-hugo-theme as a submodule."; \
echo ; \
echo "Please see https://theme.scientific-python.org/getstarted/"; \
echo ; \
exit 1; \
fi

themes: themes/scientific-python-hugo-theme

html: ## Build site in `./public`
html: themes
hugo

serve: ## Serve site, typically on http://localhost:1313
serve: themes
@hugo --printI18nWarnings server

clean: ## Remove built files
clean:
-rm -rf $(BUILDDIR)/*
-rm -f *~

html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."


linkcheck: site
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."

doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

# fperez - new targets I've added after sphinx-quickstart
site: html
python _scripts/copy_trees.py

# Copy changes to the repo from which they are served
gh-pages: site
@echo
@echo
@echo "!! Builds are now done via GH actions, so this step should be unnecessary"
@echo
@echo
python _scripts/gh-pages.py

team:
python tools/team_list.py > team.rst

rm -rf public
21 changes: 0 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1 @@
# scikit-image.org webpage

## Deploying

*These instructions are now executed automatically every time a new commit
is made to the main branch. They're provided here in case a manual deploy is needed:*

To build:

```
make gh-pages
```

To upload:

```
cd gh-pages
git push origin main
```

where ``origin`` is
``[email protected]:scikit-image/scikit-image.github.com.git``.
Binary file removed _static/GitHub-Mark-32px.png
Binary file not shown.
Binary file removed _static/coins-small.png
Binary file not shown.
26 changes: 0 additions & 26 deletions _static/custom.css

This file was deleted.

Binary file removed _static/sobel-coins-small.png
Binary file not shown.
12 changes: 0 additions & 12 deletions _templates/navbar.html

This file was deleted.

45 changes: 0 additions & 45 deletions _templates/sidebar_links.html

This file was deleted.

52 changes: 0 additions & 52 deletions _templates/sidebar_versions.html

This file was deleted.

Loading
Loading