-
Notifications
You must be signed in to change notification settings - Fork 54
Fix redirects #283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix redirects #283
Conversation
Bumps [sphinx-design](https://github.com/executablebooks/sphinx-design) from 0.3.0 to 0.4.1. - [Release notes](https://github.com/executablebooks/sphinx-design/releases) - [Changelog](https://github.com/executablebooks/sphinx-design/blob/main/CHANGELOG.md) - [Commits](executablebooks/sphinx-design@v0.3.0...v0.4.1) --- updated-dependencies: - dependency-name: sphinx-design dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bump sphinx-design from 0.3.0 to 0.4.1
Update conf.py
#build_preview |
This PR has been built with Sphinx and can be previewed at: https://fortran-lang.github.io/webpage/pr/283 |
The build preview says 404. How can I check that this PR works? Probably locally. I will have time tomorrow to look into this. |
@certik it is due to the preview build restrictions you can checkout it here : https://fortran-lang.org/pr/283/en/ . it would be great if you could test it locally. Thanks. |
I think you move things around in the workflow. How about you create a script that you call from the CI, that we can also run locally? Then we can test it that everything works. |
I recommend to directly change this in the diff --git a/build.py b/build.py
index 9e50d513b..41652158e 100644
--- a/build.py
+++ b/build.py
@@ -62,7 +62,7 @@ If you are not redirected automatically, follow the <a href='{0}'>link</a>.
"""
-def build_docs(language: str) -> None:
+def build_docs(language: str, root: bool) -> None:
"""
Build the documentation for a single language.
@@ -78,7 +78,7 @@ def build_docs(language: str) -> None:
"-b",
"dirhtml",
str(srcdir),
- str(outdir / language),
+ str(outdir) if root else str(outdir / language),
f"-Dlanguage={language}",
],
cwd=root,
@@ -119,11 +119,11 @@ def build_all(redirects: Dict[str, str], languages: List[str]) -> None:
List of languages to build the documentation for.
"""
- for language in languages:
- build_docs(language)
-
build_redirects(redirects, languages[0])
+ for language in languages:
+ build_docs(language, language == languages[0])
+
if __name__ == "__main__":
|
@henilp105 go ahead and do the change that @awvwgk suggested. Then ping me, I'll test it again locally. |
Sure, @certik I have made the changes , can you please test it locally ? |
The Preview of the PR: https://henilp105.github.io/webpage/ |
This PR is to resolve #222 , Please refer : https://fortran-lang.discourse.group/t/4942
I have shifted the en/ to root directory and set the language redirections for other languages.
This is a permant patch to fix the bing as it seems the most likely cause could be
HTML redirection
, as we don't have the functionality to add301 Redirect
in gh-pages, thus this PR is a permanant fix to this redirection bug , and this same method of redirection is also used in the fpm-docs repository and we seem to reproduce the same problem for the fpm-docs repository as well.Thanks and Regards,
Henil
CC @awvwgk @certik