-
Notifications
You must be signed in to change notification settings - Fork 5
Add website #134
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
Merged
adamltyson
merged 37 commits into
neuroinformatics-unit:main
from
richarddushime:sphnix-docs
Mar 12, 2025
Merged
Add website #134
Changes from 3 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
d3c74f6
Improve doc content #58
richarddushime f882987
Github repos creation
richarddushime c20945b
Fix pre-commit issues
richarddushime acecc88
title update
richarddushime 43f7a9c
description
richarddushime 5279ba8
Fix Requested Changes
richarddushime b82c0a0
improved layout
richarddushime dc847e8
Update .github/workflows/cookiecutter_docs.yml
richarddushime 2fac121
Update docs/source/conf.py
richarddushime 7708016
Update docs/source/conf.py
richarddushime bbad1ee
Update docs/source/index.md
richarddushime bbfa393
Update docs/source/project_setup.md
richarddushime ccb30f4
Update docs/source/project_setup.md
richarddushime 13cdc82
Update docs/source/contributing.md
richarddushime 3d7ec7a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 067a818
Update docs/source/contributing.md
richarddushime d9d5efb
Update docs/source/contributing.md
richarddushime a860e1a
Update docs/source/contributing.md
richarddushime 1db8ebd
Update docs/source/get_started.md
richarddushime 353e9aa
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 1c7341b
Update docs/source/index.md
richarddushime 0ffa2a8
Update docs/source/project_setup.md
richarddushime 7855823
Minor Requested changes
richarddushime 9b67998
Update README.md
richarddushime be81e07
Update README.md
richarddushime 31618c5
Update docs/source/modules.md
richarddushime 921f001
Restructuring the Navbar and Contents
richarddushime eded354
Minor Fixes
richarddushime 4a2d475
Update docs/source/index.md
richarddushime e82601c
Update docs/source/index.md
richarddushime 01b656a
Update docs/source/index.md
richarddushime 56a7686
Update docs/source/contributing.md
richarddushime 8575e62
Final
richarddushime 0717d5d
lints errors fix
richarddushime 92ccf06
lints fix
richarddushime 44323ff
Merge branch 'main' into sphnix-docs
adamltyson 865fff7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name: Documentation | ||
| on: | ||
| push: | ||
| branches: [main] | ||
| tags: ['*'] | ||
richarddushime marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| jobs: | ||
| deploy-docs: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.13' | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| pip install -r docs/requirements.txt | ||
|
|
||
| - name: Build docs | ||
| run: | | ||
| cd docs | ||
| make clean && make html | ||
|
|
||
| - name: Deploy to GitHub Pages | ||
| uses: peaceiris/actions-gh-pages@v3 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| publish_dir: ./docs/build/html | ||
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Minimal makefile for Sphinx documentation | ||
| # | ||
|
|
||
| # You can set these variables from the command line, and also | ||
| # from the environment for the first two. | ||
| SPHINXOPTS ?= | ||
| SPHINXBUILD ?= sphinx-build | ||
| SOURCEDIR = source | ||
| BUILDDIR = build | ||
|
|
||
| # Put it first so that "make" without argument is like "make help". | ||
| help: | ||
| @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
|
||
| .PHONY: help Makefile | ||
|
|
||
| # Catch-all target: route all unknown targets to Sphinx using the new | ||
| # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
| %: Makefile | ||
| @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| @ECHO OFF | ||
|
|
||
| pushd %~dp0 | ||
|
|
||
| REM Command file for Sphinx documentation | ||
|
|
||
| if "%SPHINXBUILD%" == "" ( | ||
| set SPHINXBUILD=sphinx-build | ||
| ) | ||
| set SOURCEDIR=source | ||
| set BUILDDIR=build | ||
|
|
||
| %SPHINXBUILD% >NUL 2>NUL | ||
| if errorlevel 9009 ( | ||
| echo. | ||
| echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
| echo.installed, then set the SPHINXBUILD environment variable to point | ||
| echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
| echo.may add the Sphinx directory to PATH. | ||
| echo. | ||
| echo.If you don't have Sphinx installed, grab it from | ||
| echo.https://www.sphinx-doc.org/ | ||
| exit /b 1 | ||
| ) | ||
|
|
||
| if "%1" == "" goto help | ||
|
|
||
| %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
| goto end | ||
|
|
||
| :help | ||
| %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
|
||
| :end | ||
| popd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| myst-parser | ||
| pydata-sphinx-theme | ||
| sphinx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| /* Top navbar */ | ||
| .navbar { | ||
| display: flex; | ||
| justify-content: space-between; | ||
| align-items: center; | ||
| padding: 0.8rem 2rem; | ||
| background: transparent; | ||
| } | ||
|
|
||
| .navbar-brand { | ||
| flex: 0 0 auto; | ||
| } | ||
|
|
||
| .navbar-center-group { | ||
| flex: 1; | ||
| display: flex; | ||
| justify-content: center; | ||
| gap: 2rem; | ||
| margin: 0 2rem; | ||
| float: right; | ||
| } | ||
|
|
||
| .navbar-nav { | ||
| display: flex; | ||
| gap: 1.5rem; | ||
| margin: 0; | ||
| padding: 0; | ||
| align-items: center; | ||
| } | ||
|
|
||
| .navbar-icons { | ||
| display: flex; | ||
| gap: 1.5rem; | ||
| align-items: center; | ||
| } | ||
|
|
||
| /* Rest of your existing styles remain */ | ||
| .navbar-brand-logo img { height: 40px; } | ||
| .nav-link { color: white !important; font-weight: 500; } | ||
| .icon-link { color: white !important; font-size: 1.2rem; } | ||
| .bd-sidebar-secondary { display: none !important; } | ||
|
|
||
| /* Mobile responsiveness */ | ||
| @media (max-width: 768px) { | ||
| .navbar { | ||
| flex-wrap: wrap; | ||
| padding: 0.8rem; | ||
| } | ||
|
|
||
| .navbar-center-group { | ||
| order: 2; | ||
| width: 100%; | ||
| margin: 1rem 0; | ||
| justify-content: center; | ||
| } | ||
|
|
||
| .navbar-brand { | ||
| order: 1; | ||
| } | ||
| } | ||
|
|
||
| /* Search field positioning */ | ||
| .navbar-search { | ||
| margin-left: auto; | ||
| flex: 0 0 250px; | ||
| } | ||
| .bd-search { | ||
| display: flex; | ||
| gap: 1rem; | ||
| float: right; | ||
| position: relative; | ||
| } | ||
|
|
||
| /* Search input styling */ | ||
| .bd-search .form-control { | ||
| background: rgba(255, 255, 255, 0.1) !important; | ||
| border: 1px solid rgba(255, 255, 255, 0.3) !important; | ||
| color: white !important; | ||
| padding: 0.5rem 1rem !important; | ||
| } | ||
|
|
||
| .bd-search .btn { | ||
| color: rgba(255, 255, 255, 0.7) !important; | ||
| } | ||
|
|
||
| /* Mobile responsiveness */ | ||
| @media (max-width: 768px) { | ||
| .navbar-search { | ||
| flex: 1 1 100%; | ||
| order: 3; | ||
| margin-top: 1rem; | ||
| } | ||
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
richarddushime marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| <nav class="bd-navbar navbar"> | ||
| <!-- Left: Logo --> | ||
| <div class="navbar-brand"> | ||
| <a class="navbar-brand-logo" href="{{ pathto(master_doc) }}"> | ||
| <img src="{{ pathto('_static/logo.png', 1) }}" alt="{{ project }} logo"> | ||
| </a> | ||
| </div> | ||
|
|
||
| <!-- Center: Navigation items --> | ||
| <div class="navbar-center-group"> | ||
| <ul class="nav navbar-nav"> | ||
| <li class="nav-item"> | ||
| <a class="nav-link" href="https://cookiecutter-data-science.drivendata.org/">About</a> | ||
| </li> | ||
| <li class="nav-item"> | ||
| <a class="nav-link" href="{{ pathto('contributing') }}">Contribute</a> | ||
| </li> | ||
| </ul> | ||
|
|
||
| <div class="navbar-icons"> | ||
| <a href="https://github.com/neuroinformatics-unit/python-cookiecutter" class="icon-link" title="GitHub"> | ||
| <i class="fab fa-github">GitHub</i> | ||
| </a> | ||
| <a href="https://github.com/yourusername/cookiecutter-python/stargazers" class="icon-link" title="Give us a Star"> | ||
| <i class="fas fa-star" style="color: gold;">Give a Star</i> | ||
| </a> | ||
| </div> | ||
| </div> | ||
|
|
||
| <!-- Right: Custom Search --> | ||
| <div class="navbar-search"> | ||
| {% include "search-field.html" %} | ||
| </div> | ||
| </nav> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| {%- if pagename != "search" %} | ||
| <div class="bd-search"> | ||
| <form class="bd-search d-flex" action="{{ pathto('search') }}" method="get"> | ||
| <input type="search" class="form-control" name="q" id="search-input" placeholder="{{ _('Search...') }}" | ||
| aria-label="{{ _('Search...') }}" autocomplete="off"> | ||
| <button class="btn" type="submit"> | ||
| <i class="fas fa-search"></i> | ||
| </button> | ||
| </form> | ||
| </div> | ||
| {%- endif %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <div class="sidebar-header-items__center"> | ||
| <nav class="bd-links" id="bd-docs-nav" aria-label="Main navigation"> | ||
| <div class="bd-toc-item navbar-nav"> | ||
| {{ toctree(maxdepth=2, includehidden=True, collapse=False) }} | ||
| </div> | ||
| </nav> | ||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # conf.py | ||
|
|
||
| # -- Project information ----------------------------------------------------- | ||
| project = 'cookiecutter-python' | ||
| author = 'Name' | ||
| release = '0.1.0' | ||
|
|
||
| # -- General configuration --------------------------------------------------- | ||
| extensions = [ | ||
| "myst_parser", | ||
| "sphinx_design", | ||
| "sphinx.ext.autodoc", | ||
| "sphinx.ext.napoleon" | ||
| ] | ||
|
|
||
| myst_enable_extensions = [ | ||
| "colon_fence", | ||
| "deflist", | ||
| "linkify", | ||
| "substitution", | ||
| "tasklist", | ||
| ] | ||
|
|
||
| source_suffix = { | ||
| '.md': 'markdown', | ||
| '.rst': 'restructuredtext' | ||
| } | ||
|
|
||
| templates_path = ['_templates'] | ||
|
|
||
| # -- HTML output options ----------------------------------------------------- | ||
| html_theme = 'pydata_sphinx_theme' | ||
| html_logo = "_static/logo.png" | ||
| html_static_path = ["_static"] | ||
|
|
||
| html_theme_options = { | ||
| # Disable all default search locations | ||
| "navbar_end": [], | ||
| "navbar_persistent": [], | ||
|
|
||
| # Configure navbar | ||
| "navbar_start": [], | ||
| "navbar_center": ["navbar.html"], | ||
| "navbar_end": [], | ||
|
|
||
| # Disable right sidebar and TOC | ||
| "show_toc_level": 0, | ||
| "secondary_sidebar_items": [], | ||
|
|
||
| # Keep other settings | ||
| "show_nav_level": 2, | ||
| "navigation_depth": 3, | ||
| "collapse_navigation": True, | ||
| } | ||
|
|
||
| html_sidebars = { | ||
| "**": ["sidebar-nav.html", "search-field.html"] | ||
| } | ||
|
|
||
| def setup(app): | ||
| app.add_css_file("css/custom.css") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| Contributing to cookiecutter-python | ||
| ===================================== | ||
|
|
||
| Thank you for considering contributing to cookiecutter-python! | ||
| We welcome contributions that improve the project, whether it’s code, documentation, or enhancements. | ||
| Please follow the guidelines below to ensure a smooth process. | ||
|
|
||
| Workflow | ||
| -------- | ||
|
|
||
| 1. **Fork and Clone the Repository** | ||
| Fork the main repository on GitHub, then clone your fork locally: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| git clone https://github.com/<your-username>/python-cookiecutter.git | ||
| cd python-cookiecutter | ||
|
|
||
| 2. **Create a New Branch** | ||
| Create and switch to a new branch for your changes: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| git checkout -b my_new_feature | ||
|
|
||
| 3. **Make Your Changes** | ||
| Edit the website content, code, or documentation as needed. | ||
| When you’re ready, add and commit your changes with a descriptive message: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| git add . | ||
| git commit -m "Describe your changes here" | ||
|
|
||
| 4. **Push Your Branch and Create a Pull Request** | ||
| Push the new branch to GitHub: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| git push origin --set-upstream origin my_new_feature | ||
|
|
||
| Then, open a pull request against the `main` branch of the main repository. | ||
| This will automatically trigger a GitHub Action to verify that the website builds correctly. | ||
|
|
||
| 5. **Review and Merge** | ||
| If the build checks pass, assign someone to review your pull request. | ||
| Once approved and merged into the `main` branch, another GitHub Action will build the website and publish it to the `gh-pages` branch. | ||
|
|
||
| 6. **Deployment** | ||
| After merging, the updated website will be available at: | ||
| `python-cookiecutter.github.io` | ||
|
|
||
| Local Testing | ||
| ------------- | ||
|
|
||
| Before pushing your changes, you can test the website locally: | ||
|
|
||
| - **First-Time Setup:** | ||
| Install the required dependencies and build the site: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| pip install -r docs/requirements.txt | ||
| sphinx-build docs/source docs/build | ||
|
|
||
| Alternatively, you can use the following commands to install the dependencies and build the site: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| pip install -r docs/requirements.txt | ||
| cd docs | ||
| make html | ||
|
|
||
| - **Rebuilding the Site:** | ||
| Each time you update the documentation, rebuild the site by running: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| rm -rf docs/build && sphinx-build docs/source docs/build | ||
|
|
||
| Then, open ``docs/build/index.html`` in your browser to preview the changes. | ||
|
|
||
| Additional Guidelines | ||
| --------------------- | ||
|
|
||
| - **Coding Standards:** Ensure that your contributions follow the project's coding and documentation guidelines. | ||
| - **Commit Messages:** Write clear and concise commit messages. | ||
| - **Documentation:** If your changes affect the website or project behavior, please update the documentation accordingly. | ||
|
|
||
| Thank you for your contributions! |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.