Skip to content

Commit 5279ba8

Browse files
Fix Requested Changes
1 parent 43f7a9c commit 5279ba8

23 files changed

+519
-542
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

docs/source/_static/css/custom.css

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
align-items: center;
3535
}
3636

37-
/* Rest of your existing styles remain */
3837
.navbar-brand-logo img { height: 40px; }
3938
.nav-link { color: white !important; font-weight: 500; }
4039
.icon-link { color: white !important; font-size: 1.2rem; }
@@ -58,36 +57,3 @@
5857
order: 1;
5958
}
6059
}
61-
62-
/* Search field positioning */
63-
.navbar-search {
64-
margin-left: auto;
65-
flex: 0 0 250px;
66-
}
67-
.bd-search {
68-
display: flex;
69-
gap: 1rem;
70-
float: right;
71-
position: relative;
72-
}
73-
74-
/* Search input styling */
75-
.bd-search .form-control {
76-
background: rgba(255, 255, 255, 0.1) !important;
77-
border: 1px solid rgba(255, 255, 255, 0.3) !important;
78-
color: white !important;
79-
padding: 0.5rem 1rem !important;
80-
}
81-
82-
.bd-search .btn {
83-
color: rgba(255, 255, 255, 0.7) !important;
84-
}
85-
86-
/* Mobile responsiveness */
87-
@media (max-width: 768px) {
88-
.navbar-search {
89-
flex: 1 1 100%;
90-
order: 3;
91-
margin-top: 1rem;
92-
}
93-
}

docs/source/_static/favicon.ico

4.58 KB
Binary file not shown.

docs/source/_templates/navbar.html

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,14 @@
11
<nav class="bd-navbar navbar">
2-
<!-- Left: Logo -->
3-
<div class="navbar-brand">
4-
<a class="navbar-brand-logo" href="{{ pathto(master_doc) }}">
5-
<img src="{{ pathto('_static/logo.png', 1) }}" alt="{{ project }} logo">
6-
</a>
7-
</div>
8-
92
<!-- Center: Navigation items -->
103
<div class="navbar-center-group">
114
<ul class="nav navbar-nav">
125
<li class="nav-item">
13-
<a class="nav-link" href="https://cookiecutter-data-science.drivendata.org/">About</a>
6+
<a class="nav-link" href="{{ pathto('index') }}">About</a>
147
</li>
158
<li class="nav-item">
169
<a class="nav-link" href="{{ pathto('contributing') }}">Contribute</a>
1710
</li>
1811
</ul>
19-
20-
<div class="navbar-icons">
21-
<a href="https://github.com/neuroinformatics-unit/python-cookiecutter" class="icon-link" title="GitHub">
22-
<i class="fab fa-github">GitHub</i>
23-
</a>
24-
<a href="https://github.com/yourusername/cookiecutter-python/stargazers" class="icon-link" title="Give us a Star">
25-
<i class="fas fa-star" style="color: gold;">Give a Star</i>
26-
</a>
27-
</div>
2812
</div>
2913

30-
<!-- Right: Custom Search -->
31-
<div class="navbar-search">
32-
{% include "search-field.html" %}
33-
</div>
3414
</nav>

docs/source/_templates/search-field.html

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/source/conf.py

Lines changed: 51 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,91 @@
11
# conf.py
2-
3-
# -- Project information -----------------------------------------------------
2+
# Configuration file for the Sphinx documentation builder.
43
project = 'cookiecutter-python'
5-
author = 'Name'
6-
release = '0.1.0'
4+
copyright = "2025, Neuroinformatics Unit"
5+
author = 'NIU'
6+
release = "1.0.0"
77

88
# -- General configuration ---------------------------------------------------
99
extensions = [
1010
"myst_parser",
1111
"sphinx_design",
1212
"sphinx.ext.autodoc",
13-
"sphinx.ext.napoleon"
13+
"sphinx.ext.napoleon",
14+
"sphinx.ext.githubpages",
15+
"sphinx_autodoc_typehints",
16+
"sphinx.ext.autosummary",
17+
"sphinx.ext.viewcode",
18+
"sphinx.ext.intersphinx",
19+
"sphinx_sitemap",
20+
"nbsphinx",
1421
]
1522

23+
# Configure MyST Parser
1624
myst_enable_extensions = [
1725
"colon_fence",
1826
"deflist",
27+
"fieldlist",
28+
"html_admonition",
29+
"html_image",
1930
"linkify",
31+
"replacements",
32+
"smartquotes",
2033
"substitution",
2134
"tasklist",
35+
"attrs_inline"
2236
]
2337

38+
myst_heading_anchors = 4
39+
2440
source_suffix = {
2541
'.md': 'markdown',
2642
'.rst': 'restructuredtext'
2743
}
2844

2945
templates_path = ['_templates']
46+
exclude_patterns = [
47+
"**.ipynb_checkpoints",
48+
"**/includes/**",
49+
]
3050

3151
# -- HTML output options -----------------------------------------------------
3252
html_theme = 'pydata_sphinx_theme'
3353
html_logo = "_static/logo.png"
3454
html_static_path = ["_static"]
55+
html_title = "Python Cookiecutter"
56+
html_favicon = "_static/favicon.ico"
57+
html_show_sourcelink = False
3558

3659
html_theme_options = {
37-
# Disable all default search locations
38-
"navbar_end": [],
39-
"navbar_persistent": [],
40-
41-
# Configure navbar
42-
"navbar_start": [],
43-
"navbar_center": ["navbar.html"],
44-
"navbar_end": [],
45-
46-
# Disable right sidebar and TOC
47-
"show_toc_level": 0,
48-
"secondary_sidebar_items": [],
49-
50-
# Keep other settings
60+
"navbar_start": ["navbar-logo"],
61+
"navbar_center": ["navbar.html"],
62+
"navbar_end": ["theme-switcher", "navbar-icon-links"],
63+
"icon_links": [
64+
{
65+
"name": "GitHub",
66+
"url": "https://github.com/neuroinformatics-unit/python-cookiecutter",
67+
"icon": "fa-brands fa-github",
68+
"type": "fontawesome",
69+
}
70+
],
71+
"logo": {
72+
"text": "Python Cookiecutter",
73+
"image_light": "logo.png",
74+
"image_dark": "logo.png",
75+
},
5176
"show_nav_level": 2,
5277
"navigation_depth": 3,
5378
"collapse_navigation": True,
5479
}
5580

81+
# Sitemap configuration
82+
html_baseurl = "https://neuroinformatics-unit.github.io/python-cookiecutter/"
83+
sitemap_url_scheme = "{link}"
84+
85+
5686
html_sidebars = {
57-
"**": ["sidebar-nav.html", "search-field.html"]
87+
"**": ["sidebar-nav.html"]
5888
}
5989

6090
def setup(app):
61-
app.add_css_file("css/custom.css")
91+
app.add_css_file("css/custom.css")

docs/source/contributing.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Contributing to cookiecutter-python
2+
3+
Thank you for considering contributing to cookiecutter-python! We welcome contributions that improve the project, whether it's code,
4+
documentation, or enhancements.
5+
6+
Please follow the guidelines below to ensure a smooth process.
7+
8+
1. **Fork and Clone the Repository** Fork the main repository on
9+
GitHub, then clone your fork locally:
10+
11+
``` sh
12+
git clone https://github.com/<your-username>/python-cookiecutter.git
13+
cd python-cookiecutter
14+
```
15+
16+
2. **Create a New Branch** Create and switch to a new branch for your
17+
changes:
18+
19+
``` sh
20+
git checkout -b my_new_feature
21+
```
22+
23+
3. **Make Your Changes** Edit the content, code, or
24+
documentation as needed. When you're ready, add and commit your
25+
changes with a descriptive message:
26+
27+
``` sh
28+
git add .
29+
git commit -m "Describe your changes in short here"
30+
```
31+
32+
4. **Push Your Branch and Create a Pull Request** Push the new branch
33+
to GitHub:
34+
35+
``` sh
36+
git push origin --set-upstream origin my_new_feature
37+
```
38+
39+
Then, open a pull request against the ``main`` branch of the main repository. This will automatically trigger a GitHub Action to verify that the builds correctly.
40+
41+
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 and add your changes to the ``main`` branch.
42+
43+
44+
## Documentation Local Testing
45+
46+
If you are contributing to the Documentation, Before pushing your changes, you can test locally:
47+
48+
- **First-Time Setup:** Install the required dependencies and build
49+
the docs:
50+
51+
``` sh
52+
pip install -r docs/requirements.txt
53+
sphinx-build docs/source docs/build
54+
```
55+
56+
Alternatively, you can use the following commands to install the
57+
dependencies and build the docs:
58+
59+
``` sh
60+
pip install -r docs/requirements.txt
61+
cd docs
62+
make html
63+
```
64+
65+
- **Rebuilding:** Each time you update the documentation,
66+
rebuild the docs by running:
67+
68+
``` sh
69+
rm -rf docs/build && sphinx-build docs/source docs/build
70+
```
71+
or
72+
73+
```sh
74+
cd docs
75+
make clean && make html
76+
```
77+
78+
Then, open `docs/build/index.html` in your browser to preview the changes.
79+
80+
81+
Thank you for your contributions!

docs/source/contributing.rst

Lines changed: 0 additions & 90 deletions
This file was deleted.

0 commit comments

Comments
 (0)