Skip to content

Commit ebd13de

Browse files
richarddushimeadamltysonpre-commit-ci[bot]
authored
Add website (#134)
* Improve doc content #58 * Github repos creation * Fix pre-commit issues * title update Co-authored-by: Adam Tyson <code@adamltyson.com> * description Co-authored-by: Adam Tyson <code@adamltyson.com> * Fix Requested Changes * improved layout * Update .github/workflows/cookiecutter_docs.yml Co-authored-by: Adam Tyson <code@adamltyson.com> * Update docs/source/conf.py Co-authored-by: Adam Tyson <code@adamltyson.com> * Update docs/source/conf.py Co-authored-by: Adam Tyson <code@adamltyson.com> * Update docs/source/index.md Co-authored-by: Adam Tyson <code@adamltyson.com> * Update docs/source/project_setup.md Co-authored-by: Adam Tyson <code@adamltyson.com> * Update docs/source/project_setup.md Co-authored-by: Adam Tyson <code@adamltyson.com> * Update docs/source/contributing.md Co-authored-by: Adam Tyson <code@adamltyson.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update docs/source/contributing.md Co-authored-by: Adam Tyson <code@adamltyson.com> * Update docs/source/contributing.md Co-authored-by: Adam Tyson <code@adamltyson.com> * Update docs/source/contributing.md Co-authored-by: Adam Tyson <code@adamltyson.com> * Update docs/source/get_started.md Co-authored-by: Adam Tyson <code@adamltyson.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update docs/source/index.md Co-authored-by: Adam Tyson <code@adamltyson.com> * Update docs/source/project_setup.md Co-authored-by: Adam Tyson <code@adamltyson.com> * Minor Requested changes * Update README.md Co-authored-by: Adam Tyson <code@adamltyson.com> * Update README.md Co-authored-by: Adam Tyson <code@adamltyson.com> * Update docs/source/modules.md Co-authored-by: Adam Tyson <code@adamltyson.com> * Restructuring the Navbar and Contents * Minor Fixes * Update docs/source/index.md Co-authored-by: Adam Tyson <code@adamltyson.com> * Update docs/source/index.md Co-authored-by: Adam Tyson <code@adamltyson.com> * Update docs/source/index.md Co-authored-by: Adam Tyson <code@adamltyson.com> * Update docs/source/contributing.md Co-authored-by: Adam Tyson <code@adamltyson.com> * Final * lints errors fix * lints fix * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Adam Tyson <code@adamltyson.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 0639b09 commit ebd13de

19 files changed

+886
-294
lines changed

.gitattributes

Whitespace-only changes.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build and Deploy Sphinx Docs
2+
3+
# Generate the documentation on all merges to main, all pull requests, or by
4+
# manual workflow dispatch. The build job can be used as a CI check that the
5+
# docs still build successfully. The deploy job only runs when a tag is
6+
# pushed and actually moves the generated html to the gh-pages branch
7+
# (which triggers a GitHub pages deployment).
8+
on:
9+
push:
10+
branches:
11+
- main
12+
tags:
13+
- '*'
14+
pull_request:
15+
merge_group:
16+
workflow_dispatch:
17+
18+
jobs:
19+
linting:
20+
# scheduled workflows should not run on forks
21+
if: (${{ github.event_name == 'schedule' }} && ${{ github.repository_owner == 'neuroinformatics-unit' }} && ${{ github.ref == 'refs/heads/main' }}) || (${{ github.event_name != 'schedule' }})
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: neuroinformatics-unit/actions/lint@v2
25+
26+
build_sphinx_docs:
27+
name: Build Sphinx Docs
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: neuroinformatics-unit/actions/build_sphinx_docs@main
31+
with:
32+
python-version: 3.12
33+
use-make: true
34+
35+
deploy_sphinx_docs:
36+
name: Deploy Sphinx Docs
37+
needs: build_sphinx_docs
38+
permissions:
39+
contents: write
40+
if: (github.event_name == 'push' && github.ref_type == 'tag') || github.event_name == 'workflow_dispatch'
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: neuroinformatics-unit/actions/deploy_sphinx_docs@main
44+
with:
45+
secret_input: ${{ secrets.GITHUB_TOKEN }}
46+
use-make: true

README.md

Lines changed: 33 additions & 293 deletions
Large diffs are not rendered by default.

docs/CNAME

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
python-cookiecutter.neuroinformatics.dev
1+
python-cookiecutter.neuroinformatics.dev

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
%SPHINXBUILD% >NUL 2>NUL
14+
if errorlevel 9009 (
15+
echo.
16+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17+
echo.installed, then set the SPHINXBUILD environment variable to point
18+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
19+
echo.may add the Sphinx directory to PATH.
20+
echo.
21+
echo.If you don't have Sphinx installed, grab it from
22+
echo.https://www.sphinx-doc.org/
23+
exit /b 1
24+
)
25+
26+
if "%1" == "" goto help
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

docs/requirements.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
linkify-it-py
2+
myst-parser
3+
nbsphinx
4+
pydata-sphinx-theme
5+
setuptools-scm
6+
sphinx
7+
sphinx-autodoc-typehints
8+
sphinx-copybutton
9+
sphinx-design
10+
sphinx-gallery
11+
sphinx-notfound-page
12+
sphinx-sitemap
13+
sphinx-togglebutton

docs/source/_static/css/custom.css

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
html[data-theme=dark] {
2+
--pst-color-primary: #04B46D;
3+
--pst-color-link: var(--pst-color-primary);
4+
}
5+
6+
html[data-theme=light] {
7+
--pst-color-primary: #03A062;
8+
--pst-color-link: var(--pst-color-primary);
9+
}
10+
11+
body .bd-article-container {
12+
max-width: 100em !important;
13+
}
14+
15+
.col {
16+
flex: 0 0 50%;
17+
max-width: 50%;
18+
}
19+
20+
.img-sponsor {
21+
height: 50px;
22+
padding-top: 5px;
23+
padding-right: 5px;
24+
padding-bottom: 5px;
25+
padding-left: 5px;
26+
}
27+
28+
.things-in-a-row {
29+
display: flex;
30+
flex-wrap: wrap;
31+
justify-content: space-between;
32+
}
33+
34+
/* grids to match theme colors */
35+
.sd-card-icon {
36+
color: var(--sd-color-primary);
37+
font-size: 1.5em;
38+
margin-bottom: 0.5rem;
39+
}
40+
41+
.sd-card {
42+
padding: 1.5rem;
43+
transition: transform 0.2s;
44+
}
45+
46+
.sd-card:hover {
47+
transform: translateY(-5px);
48+
}
49+
50+
/* Ensuring content area uses full width when sidebar is hidden */
51+
.bd-page-width {
52+
max-width: 90% !important;
53+
}
54+
55+
/* Hide sidebar on pages with hide-sidebar metadata */
56+
body[data-hide-sidebar="true"] .bd-sidebar-primary {
57+
display: none !important;
58+
}
59+
60+
/* Expand content width when sidebar hidden */
61+
body[data-hide-sidebar="true"] .bd-main {
62+
flex-grow: 1;
63+
max-width: 75%;
64+
}
4.58 KB
Loading

docs/source/_static/favicon.ico

4.58 KB
Binary file not shown.

0 commit comments

Comments
 (0)