diff --git a/.gitignore b/.gitignore index c68b289bb..98e1418fd 100644 --- a/.gitignore +++ b/.gitignore @@ -35,7 +35,6 @@ MANIFEST # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec - # Installer logs pip-log.txt pip-delete-this-directory.txt @@ -163,3 +162,9 @@ doc/source/examples/gallery-examples/ doc/source/sg_execution_times.rst # rendering of sphinx autoapi examples doc/source/examples/api/ + + +# node modules and env +node_modules/ +.nodeenv/ +package-lock.json \ No newline at end of file diff --git a/doc/changelog.d/639.maintenance.md b/doc/changelog.d/639.maintenance.md new file mode 100644 index 000000000..2c722911d --- /dev/null +++ b/doc/changelog.d/639.maintenance.md @@ -0,0 +1 @@ +feat: migrate the builds system to stb \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 000000000..893d26ffb --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + "name": "ansys_sphinx_theme", + "repository": "https://github.com/ansys/ansys-sphinx-theme", + + "description": "", + "main": "", + "scripts": { + "build": "echo 'No build step needed' " + }, + "dependencies": {}, + "devDependencies": {} +} \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index a48b6cc87..91aba3f76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,12 @@ [build-system] -requires = ["flit_core >=3.2,<4"] -build-backend = "flit_core.buildapi" +requires = [ + "sphinx-theme-builder >= 0.2.0b2,<1", +] +build-backend = "sphinx_theme_builder" + +[tool.sphinx-theme-builder] +node-version = "22.14.0" +theme-name = "ansys_sphinx_theme" [project] # Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections @@ -63,19 +69,7 @@ changelog = [ ] [project.entry-points."sphinx.html_themes"] -ansys_sphinx_theme = "ansys_sphinx_theme" - -[tool.flit.module] -name = "ansys_sphinx_theme" - -[tool.flit.sdist] -include = [ - "src/ansys_sphinx_theme/theme/ansys_sphinx_theme/layout.html", - "src/ansys_sphinx_theme/theme/ansys_sphinx_theme/components/breadcrumbs.html", - "src/ansys_sphinx_theme/theme/ansys_sphinx_theme/theme.conf", - "src/ansys_sphinx_theme/theme/ansys_sphinx_theme/_templates/", - "src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/", -] +"ansys_sphinx_theme" = "ansys_sphinx_theme" [project.urls] Home = "https://sphinxdocs.ansys.com/" @@ -147,18 +141,18 @@ name = "Fixed" showcontent = true [[tool.towncrier.type]] -directory = "dependencies" -name = "Dependencies" +directory = "documentation" +name = "Documentation" showcontent = true [[tool.towncrier.type]] -directory = "miscellaneous" -name = "Miscellaneous" +directory = "test" +name = "Test" showcontent = true [[tool.towncrier.type]] -directory = "documentation" -name = "Documentation" +directory = "dependencies" +name = "Dependencies" showcontent = true [[tool.towncrier.type]] @@ -167,6 +161,6 @@ name = "Maintenance" showcontent = true [[tool.towncrier.type]] -directory = "test" -name = "Test" -showcontent = true +directory = "miscellaneous" +name = "Miscellaneous" +showcontent = true \ No newline at end of file diff --git a/src/ansys_sphinx_theme/assets/scripts/.gitkeep b/src/ansys_sphinx_theme/assets/scripts/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/src/ansys_sphinx_theme/assets/styles/.gitkeep b/src/ansys_sphinx_theme/assets/styles/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css index e11693261..35b38f09c 100644 --- a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css +++ b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css @@ -6,6 +6,9 @@ @import "sphinx-design.css"; @import "table-custom.css"; @import "sphinx-gallery.css"; +@import "whatsnew.css"; +@import "nbsphinx.css"; +@import "ansys-sphinx-theme-variable.css"; /* * Code cell diff --git a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/ast-search.css b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/ast-search.css index 130272e36..fafdd2bdd 100644 --- a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/ast-search.css +++ b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/ast-search.css @@ -1,5 +1,3 @@ -@import "ansys-sphinx-theme-variable.css"; - .static-search-results { display: flex; flex-direction: column; diff --git a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/breadcrumbs.css b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/breadcrumbs.css index 27e67d65f..75df543d2 100644 --- a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/breadcrumbs.css +++ b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/breadcrumbs.css @@ -1,8 +1,5 @@ /* Provided by the Sphinx base theme template at build time, styles exclusively for the ansys-sphinx-theme classes. */ - -@import "ansys-sphinx-theme-variable.css"; - /** * Breadcrumbs */ diff --git a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/pydata-sphinx-theme-custom.css b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/pydata-sphinx-theme-custom.css index 1a594ff86..bb840db80 100644 --- a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/pydata-sphinx-theme-custom.css +++ b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/pydata-sphinx-theme-custom.css @@ -1,7 +1,5 @@ /* Changes associated with the Ansys Sphinx Theme */ /* for pydata-sphinx-theme */ -@import "ansys-sphinx-theme-variable.css"; - /* * * _secondary sidebar and primary sidebars diff --git a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/sphinx-gallery.css b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/sphinx-gallery.css index b24541f30..6d6078f30 100644 --- a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/sphinx-gallery.css +++ b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/sphinx-gallery.css @@ -1,5 +1,3 @@ -@import "ansys-sphinx-theme-variable.css"; - /** * Sphinx gallery output cell */ diff --git a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/theme.conf b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/theme.conf index b25441b24..5d06f558c 100644 --- a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/theme.conf +++ b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/theme.conf @@ -1,5 +1,6 @@ [theme] inherit = pydata_sphinx_theme +stylesheet = styles/ansys-sphinx-theme.css [options] contact_mail =