From f9a4ae5dccf57e3c569ba6d76ea11b80b1c7cf5f Mon Sep 17 00:00:00 2001 From: naanadr Date: Mon, 25 Mar 2024 20:41:22 -0300 Subject: [PATCH 1/3] build: add package sphinx-reredirects --- poetry.lock | 28 ++++++++++++++++------------ pyproject.toml | 1 + 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/poetry.lock b/poetry.lock index 19014fd..a5e1ace 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "alabaster" @@ -519,16 +519,6 @@ files = [ {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"}, {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"}, {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:f698de3fd0c4e6972b92290a45bd9b1536bffe8c6759c62471efaa8acb4c37bc"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aa57bd9cf8ae831a362185ee444e15a93ecb2e344c8e52e4d721ea3ab6ef1823"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffcc3f7c66b5f5b7931a5aa68fc9cecc51e685ef90282f4a82f0f5e9b704ad11"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47d4f1c5f80fc62fdd7777d0d40a2e9dda0a05883ab11374334f6c4de38adffd"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1f67c7038d560d92149c060157d623c542173016c4babc0c1913cca0564b9939"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:9aad3c1755095ce347e26488214ef77e0485a3c34a50c5a5e2471dff60b9dd9c"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:14ff806850827afd6b07a5f32bd917fb7f45b046ba40c57abdb636674a8b559c"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8f9293864fe09b8149f0cc42ce56e3f0e54de883a9de90cd427f191c346eb2e1"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-win32.whl", hash = "sha256:715d3562f79d540f251b99ebd6d8baa547118974341db04f5ad06d5ea3eb8007"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-win_amd64.whl", hash = "sha256:1b8dd8c3fd14349433c79fa8abeb573a55fc0fdd769133baac1f5e07abf54aeb"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"}, @@ -961,6 +951,20 @@ sphinx = ">=4.0" [package.extras] docs = ["furo", "ipython", "myst-parser", "sphinx-copybutton", "sphinx-inline-tabs"] +[[package]] +name = "sphinx-reredirects" +version = "0.1.3" +description = "Handles redirects for moved pages in Sphinx documentation projects" +optional = false +python-versions = ">=3.5" +files = [ + {file = "sphinx_reredirects-0.1.3-py3-none-any.whl", hash = "sha256:02c53437c467cf9ed89863eff3addedc01d129624b2f03ab6302518fb77a2c89"}, + {file = "sphinx_reredirects-0.1.3.tar.gz", hash = "sha256:56e222d285f76c944fd370f36ad3a1a66103a88b552e97d3d24a622bb9465de8"}, +] + +[package.dependencies] +sphinx = "*" + [[package]] name = "sphinxcontrib-applehelp" version = "1.0.7" @@ -1171,4 +1175,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "5ca510627d0359ba010fad5d99f5c790f3938b4cff9e8d18288f2773bf9205a2" +content-hash = "f0badd53c3be4b60c2796394235d9b7f268d7e296c04cf13f545166a3143f50b" diff --git a/pyproject.toml b/pyproject.toml index 8037daa..474df35 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,7 @@ myst-parser = "^0.18.0" httpx = "^0.23.0" ghp-import = "^2.1.0" pytz = "^2023.2" +sphinx-reredirects = "^0.1.3" [tool.poetry.dev-dependencies] From fa9ae67265eca215b6f7e58d8f8eca5cd815b347 Mon Sep 17 00:00:00 2001 From: naanadr Date: Mon, 25 Mar 2024 20:42:10 -0300 Subject: [PATCH 2/3] feat: add redirect config --- source/conf.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/source/conf.py b/source/conf.py index 329807a..8c91f99 100644 --- a/source/conf.py +++ b/source/conf.py @@ -3,6 +3,7 @@ from datetime import datetime import pytz + # Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full @@ -22,9 +23,9 @@ # -- Project information ----------------------------------------------------- -project = 'APyB' -copyright = 'APyB, 2024' -author = 'Associação Python Brasil' +project = "APyB" +copyright = "APyB, 2024" +author = "Associação Python Brasil" html_baseurl = "https://apyb.python.org.br" @@ -38,6 +39,7 @@ extensions = [ "sphinx.ext.githubpages", + "sphinx_reredirects", "myst_parser", # Local extensions "github_issues_url", @@ -45,6 +47,10 @@ "template", ] +redirects = { + "guias/como-organizar-eventos/": "https://apyb.python.org.br/associados/guias/como-organizar-eventos/", +} + myst_enable_extensions = [ "colon_fence", ] @@ -54,7 +60,7 @@ } # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +templates_path = ["_templates"] new_issue_title = "Melhoria na página: {document_path}" new_issue_body = """ @@ -73,14 +79,14 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = 'pt_BR' +language = "pt_BR" # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. exclude_patterns = [] -html_extra_path = [os.path.join(os.path.abspath('.'), '_files')] +html_extra_path = [os.path.join(os.path.abspath("."), "_files")] # -- Options for HTML output ------------------------------------------------- From dc54e313138eac1c7c356ab8654a553e330d2f27 Mon Sep 17 00:00:00 2001 From: naanadr Date: Wed, 17 Apr 2024 10:14:47 -0300 Subject: [PATCH 3/3] feat: add a test page with stripe catalog page --- source/associados/test.rst | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 source/associados/test.rst diff --git a/source/associados/test.rst b/source/associados/test.rst new file mode 100644 index 0000000..0e3fb8c --- /dev/null +++ b/source/associados/test.rst @@ -0,0 +1,6 @@ +.. raw:: html + + + + \ No newline at end of file