From e8337b75b023af7338d61d8afd102f068bd59719 Mon Sep 17 00:00:00 2001 From: nabobalis Date: Sat, 10 Mar 2018 17:27:21 +0100 Subject: [PATCH 01/17] Start of the fixes --- .circleci/config.yml | 33 +++++++++++++++++++++-------- .travis.yml | 30 -------------------------- sunpy_sphinx_theme/conf.py | 5 +++-- sunpy_sphinx_theme/sunpy/theme.conf | 1 + 4 files changed, 28 insertions(+), 41 deletions(-) delete mode 100644 .travis.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index 8de72e43f..3dbbf8447 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,11 +10,23 @@ pip-run: &pip-install python3 -m venv venv echo "source /home/circleci/project/venv/bin/activate" >> $BASH_ENV +npm-run: &npm-install + name: Install NPM dependencies + command: | + sudo apt update + sudo npm install -g stylelint + sudo npm install -g stylelint-config-recommended + version: 2 jobs: - html-docs: - environment: - - MAIN_CMD: "pip install -e ." + linter: + docker: + - image: circleci/node:4.8.2 + steps: + - run: *npm-install + - run: stylelint sunpy_sphinx_theme/sunpy/static/style.css + + website: docker: - image: circleci/python:3.6 steps: @@ -22,27 +34,30 @@ jobs: - run: *apt-install - run: *pip-install - run: pip install -U setuptools - - run: $MAIN_CMD $SETUP_CMD + - run: pip install -e . - run: git clone https://github.com/sunpy/sunpy.github.io.git - - run: pip install -r $HOME/project/sunpy.github.io/requirements.txt + - run: pip install -r sunpy.github.io/requirements.txt - run: pip install -U sphinx - run: make -C $HOME/project/sunpy.github.io html - run: rm $HOME/project/sunpy.github.io/_build/html/CNAME - store_artifacts: - path: $HOME/project/sunpy.github.io/_build/html + path: sunpy.github.io/_build/html - run: name: "Built documentation is available at:" command: DOCS_URL="${CIRCLE_BUILD_URL}/artifacts/${CIRCLE_NODE_INDEX}/${CIRCLE_WORKING_DIRECTORY/#\~/$HOME}/project/sunpy.github.io/_build/html/index.html"; echo $DOCS_URL - workflows: version: 2 - test-documentation: + test-linter: + jobs: + - linter + + test-website-build: jobs: - - html-docs + - website notify: webhooks: diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 30414e3a3..000000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: python - -python: - - 3.6 - -before_install: - - npm install -g stylelint - - npm install stylelint-config-recommended - - stylelint ./sunpy_sphinx_theme/sunpy/static/style.css - -install: - - pip install -e . - - git clone https://github.com/sunpy/sunpy.github.io.git - - cd sunpy.github.io - - pip install -r requirements.txt - - pip install -U sphinx - -script: - - make html - - rm ./_build/html/CNAME - -deploy: - edge: - branch: v1.8.47 - provider: pages - skip_cleanup: true - github_token: $mytoken - local_dir: sunpy.github.io/_build/html/ - on: - branch: master diff --git a/sunpy_sphinx_theme/conf.py b/sunpy_sphinx_theme/conf.py index 032a00246..fdc91cc41 100644 --- a/sunpy_sphinx_theme/conf.py +++ b/sunpy_sphinx_theme/conf.py @@ -17,6 +17,7 @@ def page_url(page): 'navbar_links': [ ("Support Us", page_url("contribute.html"), 1), ("Get Help", page_url("help.html"), 1), - ("SunPy Project", page_url("team.html"), 1), - ] + ("SunPy Project", page_url("team.html"), 1) + ], + 'html_sidebars': {'**': ['docsidebar.html']} } diff --git a/sunpy_sphinx_theme/sunpy/theme.conf b/sunpy_sphinx_theme/sunpy/theme.conf index a6ea20fe7..7e7af01e9 100644 --- a/sunpy_sphinx_theme/sunpy/theme.conf +++ b/sunpy_sphinx_theme/sunpy/theme.conf @@ -6,6 +6,7 @@ navbar_pagenav = False source_link_position = False bootswatch_theme = flatly bootstrap_version = 3 +html_sidebars = logo_url = http://sunpy.org/ opengraph_image = img/sunpy_icon.svg From 0f960f76705b2a12bb439c0eeb56e1d5d421b5a4 Mon Sep 17 00:00:00 2001 From: nabobalis Date: Sat, 10 Mar 2018 19:28:34 +0100 Subject: [PATCH 02/17] AF dropdown update --- sunpy_sphinx_theme/sunpy/navbar.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sunpy_sphinx_theme/sunpy/navbar.html b/sunpy_sphinx_theme/sunpy/navbar.html index cd85fb74a..296220846 100644 --- a/sunpy_sphinx_theme/sunpy/navbar.html +++ b/sunpy_sphinx_theme/sunpy/navbar.html @@ -38,10 +38,10 @@ IRISPy