|
| 1 | +from datetime import datetime |
| 2 | + |
| 3 | +project = 'extliner' |
| 4 | +release = '0.0.1' |
| 5 | +year = datetime.now().year |
| 6 | +copyright = f"{year} CodePerfectPlus" |
| 7 | + |
| 8 | +# Paths and source setup |
| 9 | +templates_path = ['_templates'] |
| 10 | +source_suffix = ".rst" |
| 11 | +master_doc = "index" |
| 12 | +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '.venv'] |
| 13 | +html_static_path = ['_static'] |
| 14 | + |
| 15 | +# Extensions for Sphinx |
| 16 | +extensions = [ |
| 17 | + 'sphinx.ext.autodoc', # Generate docs from docstrings |
| 18 | + 'sphinx.ext.todo', # Support TODO directives |
| 19 | + 'sphinx.ext.coverage', # Documentation coverage |
| 20 | + 'sphinx.ext.viewcode', # Link to source code in docs |
| 21 | + 'sphinx.ext.autosectionlabel', # Reference sections automatically |
| 22 | + 'sphinx.ext.githubpages', # GitHub Pages support |
| 23 | +] |
| 24 | + |
| 25 | +# Avoid ambiguous section labels |
| 26 | +autosectionlabel_prefix_document = True |
| 27 | + |
| 28 | +# PDF generation (optional) |
| 29 | +pdf_documents = [ |
| 30 | + ('index', 'Extliner_Documentation', 'Extliner Docs', 'Extliner Team') |
| 31 | +] |
| 32 | + |
| 33 | +# GitHub releases integration |
| 34 | +releases_github_path = "codeperfectplus/extliner" |
| 35 | +releases_unstable_prehistory = True |
| 36 | + |
| 37 | +# HTML output options |
| 38 | +html_theme = 'pydata_sphinx_theme' # Nice modern theme, alternatives: 'sphinx_rtd_theme' |
| 39 | +html_theme_options = { |
| 40 | + "show_prev_next": True, |
| 41 | + "navigation_depth": 4, |
| 42 | + "collapse_navigation": True, |
| 43 | + "navbar_align": "content", |
| 44 | + "show_nav_level": 2, |
| 45 | + "icon_links": [ |
| 46 | + { |
| 47 | + "name": "GitHub", |
| 48 | + "url": "https://github.com/codeperfectplus/extliner", |
| 49 | + "icon": "fab fa-github", |
| 50 | + "type": "fontawesome" |
| 51 | + }, |
| 52 | + { |
| 53 | + "name": "Releases", |
| 54 | + "url": "https://github.com/codeperfectplus/extliner/releases", |
| 55 | + "icon": "fas fa-tag", |
| 56 | + "type": "fontawesome" |
| 57 | + } |
| 58 | + ], |
| 59 | + "use_edit_page_button": True, |
| 60 | +} |
| 61 | + |
| 62 | +# GitHub edit button context |
| 63 | +html_context = { |
| 64 | + "github_user": "codeperfectplus", |
| 65 | + "github_repo": "extliner", |
| 66 | + "github_version": "main", |
| 67 | + "doc_path": "docs", |
| 68 | +} |
| 69 | + |
| 70 | +# Sidebars config |
| 71 | +html_sidebars = { |
| 72 | + '**': [ |
| 73 | + 'globaltoc.html', |
| 74 | + 'relations.html', |
| 75 | + 'sourcelink.html', |
| 76 | + 'searchbox.html' |
| 77 | + ] |
| 78 | +} |
| 79 | + |
| 80 | +# Additional CSS files (add custom styles if any) |
| 81 | +html_css_files = [ |
| 82 | + 'custom.css', |
| 83 | +] |
0 commit comments