diff --git a/docs/source/_static/colorsets.js b/docs/source/_static/colorsets.js index 6afb790..55e4b2c 100644 --- a/docs/source/_static/colorsets.js +++ b/docs/source/_static/colorsets.js @@ -27,22 +27,22 @@ export class ColorSetHandler { } applyColor(color) { - // Aquí, meter el código que sustituye una hoja de estilos - // por otra. O sea, sphinx-nefertiti-blue.css o - // sphinx-nefertiti-red.css, etc. + // This method replaces the current stylesheet by the new one, + // based on the given color. let stylesheet = color === DEFAULT ? `sphinx-nefertiti` : `sphinx-nefertiti-${color}`; const re = new RegExp("\/(?sphinx\-nefertiti[\-]?[a-z]*)\."); - for (const sheet of document.getElementsByTagName("link")) { if (sheet.href) { - const match = sheet.href.match(re); + const url = new URL(sheet.href); + const match = url.pathname.match(re); if (match) { const matching_name = match.groups['name']; if (matching_name !== stylesheet) { - sheet.href = sheet.href.replace(matching_name, stylesheet); + url.pathname = url.pathname.replace(matching_name, stylesheet); + sheet.href = url.toString(); } break; } diff --git a/docs/source/conf.py b/docs/source/conf.py index 8ce3b83..981ee74 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -19,7 +19,6 @@ master_doc = 'index' project = 'Nefertiti for Sphinx' -# copyright = '2022, MIT License' copyright = 'Code licensed MIT, docs CC BY 3.0.' diff --git a/package.json b/package.json index 2e4d2bb..2d9708f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sphinx-nefertiti", - "version": "0.1.10", + "version": "0.1.11", "private": true, "description": "Private repository related with sphinx-nefertiti.", "engines": { diff --git a/setup.py b/setup.py index ac464f1..83d4e6e 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ setup( name="sphinx-nefertiti", - version="0.1.10", + version="0.1.11", packages=find_packages(), include_package_data=True, license="MIT",