Skip to content

Commit

Permalink
basic settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ulysseherbach committed Oct 9, 2024
1 parent 2fde45c commit 6bac193
Show file tree
Hide file tree
Showing 8 changed files with 155 additions and 63 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# FluffyClone

[![GitHub Release](https://img.shields.io/github/v/release/ulysseherbach/fluffyclone?logo=github)](https://github.com/ulysseherbach/fluffyclone)
47 changes: 11 additions & 36 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -1,46 +1,21 @@
html[data-theme="dark"] .mermaid svg {
filter: invert();
}

html[data-theme="dark"] .bd-content div.cell_output img {
padding: unset;
}

html[data-theme="dark"] .hide summary {
background-color: #29313d !important;
color: #EEFFFF;
}

.bd-search {
a.reference {
border: 0;
border-radius: .5rem;
}

div.cell details.above-input > summary {
border-bottom: var(--mystnb-source-border-width) var(--mystnb-source-border-color) solid;
}

div.cell details.above-input div.cell_input {
border-top: var(--mystnb-source-border-width) var(--mystnb-source-border-color) solid;
}

.nbinput button.copybtn {
top: 0.3em;
}

.nboutput button.copybtn,
.cell_output button.copybtn {
display: none;
a.reference.external:hover {
border: 0;
}

button.btn.version-switcher__button {
margin-bottom: unset
div.sphinxsidebar a {
border: 0;
}

div.cell_output tbody tr:nth-child(2n+1){
background: unset;
h1.logo a:hover {
border: 0;
}

div.cell_output tbody tr:hover {
background: rgba(66, 165, 245, 0.2);
}
/*.bd-search {
border: 0;
border-radius: .5rem;
}*/
22 changes: 22 additions & 0 deletions docs/api/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# API documentation

## Sub modules

```{eval-rst}
.. autosummary::
:toctree: .
:nosignatures:
:recursive:
fluffyclone.base
```

## Modules

```{eval-rst}
.. autosummary::
:toctree: .
:nosignatures:
fluffyclone.base
```
97 changes: 81 additions & 16 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,102 @@

# -- General configuration ---------------------------------------------------

extensions = []
extensions = [
'myst_parser',
'sphinx_copybutton',
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.autosummary',
# 'sphinx_multiversion',
# 'sphinx_sitemap',
]

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'README*',
'api'
]
source_suffix = {'.md': 'markdown', '.rst': 'restructuredtext'}

# -- Options for HTML output -------------------------------------------------

html_title = 'FluffyClone documentation'
html_baseurl = 'https://ulysseherbach.github.io/fluffyclone/'
html_static_path = ['_static']
html_css_files = ['custom.css']
# html_copy_source = False

html_theme = 'pydata_sphinx_theme'
# html_sidebars = {
# '**': ['globaltoc.html', 'sourcelink.html', 'searchbox.html'],
# }

# html_theme = 'sphinx_book_theme'

html_theme = 'alabaster'
html_theme_options = {
'icon_links': [
{
'name': 'GitHub',
'url': 'https://github.com/ulysseherbach/fluffyclone',
'icon': 'fa-brands fa-github',
'type': 'fontawesome',
}
],
'pygments_light_style': 'default',
'pygments_dark_style': 'material',
'fixed_sidebar': True,
# 'logo': 'logo.png',
# 'github_user': 'ulysseherbach',
# 'github_repo': 'fluffyclone',
}

# html_theme = 'pydata_sphinx_theme'
# html_theme_options = {
# 'icon_links': [
# {
# 'name': 'GitHub',
# 'url': 'https://github.com/ulysseherbach/fluffyclone',
# 'icon': 'fa-brands fa-github',
# 'type': 'fontawesome',
# }
# ],
# 'pygments_light_style': 'default',
# 'pygments_dark_style': 'material',
# }

# -- Options for sphinx.ext.autodoc ------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html

# Automatically extract typehints when specified and place them in
# descriptions of the relevant function/method
autodoc_typehints = 'description'

# Don't show class signature with the class' name
autodoc_class_signature = 'separated'

# -- Options for sphinx.ext.napoleon -----------------------------------------

napoleon_google_docstring = False
napoleon_numpy_docstring = True

# -- Options for sphinx.ext.autosummary --------------------------------------

autosummary_generate = True
autosummary_ignore_module_all = False
# autosummary_imported_members = True

# -- Options for myst_parser -------------------------------------------------

myst_enable_extensions = [
'colon_fence',
# 'amsmath',
# 'dollarmath',
# 'strikethrough',
# 'tasklist',
]

# -- Options for sphinx-copybutton ------------------------------------------
# https://sphinx-copybutton.readthedocs.io/en/latest

copybutton_exclude = '.linenos, .gp, .go'
copybutton_prompt_text = r'[$!]\s*'
copybutton_prompt_is_regexp = True

# -- Project information -----------------------------------------------------

project = 'FluffyClone'
# project = 'FluffyClone'
copyright = '2024, Ulysse Herbach'
author = 'Ulysse Herbach'

# -- Dynamic information -----------------------------------------------------
# -- Dynamic settings --------------------------------------------------------

# Get current version
try:
Expand All @@ -48,3 +111,5 @@
raise RuntimeError('fluffyclone must be installed for autodoc to work.')

release = version
project = f'FluffyClone {version}'
# html_title = f'FluffyClone {version} documentation'
22 changes: 22 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Welcome to FluffyClone docs

:::{include} ../README.md
:start-line: 2
:::

:::{warning}
This documentation is still a draft.
:::


## Indexes

* [General Index](genindex)
* [Module Index](modindex)


:::{toctree}
:hidden:

quickstart/index
:::
11 changes: 0 additions & 11 deletions docs/index.rst

This file was deleted.

17 changes: 17 additions & 0 deletions docs/quickstart/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Quickstart


```{code-block} python
---
emphasize-lines: 1, 2
---
a = 2
print('my 1st line')
print(f'my {a}nd line')
```

```{code-block} python
a = 2
print('my 1st line')
print(f'my {a}nd line')
```
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
sphinx
pydata-sphinx-theme
myst-parser

0 comments on commit 6bac193

Please sign in to comment.