From 2825da00b18c458ead082861c412777c5a47ee75 Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 27 Oct 2020 11:40:47 +1100 Subject: [PATCH 1/4] setup redirect for index_toc --- lectures/_config.yml | 4 +++- lectures/redirects.txt | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 lectures/redirects.txt diff --git a/lectures/_config.yml b/lectures/_config.yml index a6904a19..ef234c7a 100644 --- a/lectures/_config.yml +++ b/lectures/_config.yml @@ -12,7 +12,7 @@ html: baseurl: https://python.quantecon.org/ sphinx: - extra_extensions: [sphinx_multitoc_numbering, sphinx_exercise] + extra_extensions: [sphinx_multitoc_numbering, sphinx_exercise, sphinxext.rediraffe] config: html_favicon: _static/lectures-favicon.ico html_theme: quantecon_book_theme @@ -27,3 +27,5 @@ sphinx: description: This website presents a set of lectures on python programming for economics, designed and written by Thomas J. Sargent and John Stachurski. keywords: Python, QuantEcon, Quantitative Economics, Economics, Sloan, Alfred P. Sloan Foundation, Tom J. Sargent, John Stachurski google_analytics_id: UA-54984338-9 + rediraffe_redirects: "redirects.txt" + exclude_patterns: ["redirects.txt"] diff --git a/lectures/redirects.txt b/lectures/redirects.txt new file mode 100644 index 00000000..93f6a8b4 --- /dev/null +++ b/lectures/redirects.txt @@ -0,0 +1 @@ +index_toc.md intro.md \ No newline at end of file From 8d768438ad39182cde2e3d089b9143dcd2a85b71 Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 27 Oct 2020 11:42:18 +1100 Subject: [PATCH 2/4] add software --- environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment.yml b/environment.yml index 7f73ee7f..9b2c10e6 100644 --- a/environment.yml +++ b/environment.yml @@ -7,6 +7,7 @@ dependencies: - pip - pip: - jupyter-book + - sphinxext-rediraffe - git+https://github.com/executablebooks/sphinx-multitoc-numbering - git+https://github.com/quantecon/quantecon-book-theme - git+https://github.com/executablebooks/sphinx-exercise.git From 1b562c3e0cad4ef5b9c5645e6ca5fd504f056944 Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 27 Oct 2020 11:48:46 +1100 Subject: [PATCH 3/4] use juptyer-book pattern --- lectures/_config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lectures/_config.yml b/lectures/_config.yml index ef234c7a..5dd50d76 100644 --- a/lectures/_config.yml +++ b/lectures/_config.yml @@ -2,6 +2,7 @@ title: Python Programming for Economics and Finance author: Thomas J. Sargent & John Stachurski logo: _static/qe-logo.png description: This website presents a set of lectures on python programming for economics, designed and written by Thomas J. Sargent and John Stachurski. +exclude_patterns: [_build, Thumbs.db, .DS_Store, "**.ipynb_checkpoints", redirects.txt] execute: execute_notebooks: "cache" @@ -28,4 +29,3 @@ sphinx: keywords: Python, QuantEcon, Quantitative Economics, Economics, Sloan, Alfred P. Sloan Foundation, Tom J. Sargent, John Stachurski google_analytics_id: UA-54984338-9 rediraffe_redirects: "redirects.txt" - exclude_patterns: ["redirects.txt"] From 58142b63c4913112c7f0830c0114c7e4b4467027 Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 27 Oct 2020 11:55:56 +1100 Subject: [PATCH 4/4] remove need for redirects.txt file --- lectures/_config.yml | 4 ++-- lectures/redirects.txt | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 lectures/redirects.txt diff --git a/lectures/_config.yml b/lectures/_config.yml index 5dd50d76..f19df2d1 100644 --- a/lectures/_config.yml +++ b/lectures/_config.yml @@ -2,7 +2,6 @@ title: Python Programming for Economics and Finance author: Thomas J. Sargent & John Stachurski logo: _static/qe-logo.png description: This website presents a set of lectures on python programming for economics, designed and written by Thomas J. Sargent and John Stachurski. -exclude_patterns: [_build, Thumbs.db, .DS_Store, "**.ipynb_checkpoints", redirects.txt] execute: execute_notebooks: "cache" @@ -28,4 +27,5 @@ sphinx: description: This website presents a set of lectures on python programming for economics, designed and written by Thomas J. Sargent and John Stachurski. keywords: Python, QuantEcon, Quantitative Economics, Economics, Sloan, Alfred P. Sloan Foundation, Tom J. Sargent, John Stachurski google_analytics_id: UA-54984338-9 - rediraffe_redirects: "redirects.txt" + rediraffe_redirects: + index_toc.md: intro.md diff --git a/lectures/redirects.txt b/lectures/redirects.txt deleted file mode 100644 index 93f6a8b4..00000000 --- a/lectures/redirects.txt +++ /dev/null @@ -1 +0,0 @@ -index_toc.md intro.md \ No newline at end of file