From 7d489d74133871018411ab765db8e3ee8ba7fd8f Mon Sep 17 00:00:00 2001 From: Edoardo Apra Date: Thu, 4 Jun 2020 18:48:26 -0700 Subject: [PATCH 1/3] mkdocs to build web pages --- contrib/mkdocs/README.md | 61 +++++++++++++++++++++++++++++++++++++++ contrib/mkdocs/mkdocs.yml | 27 +++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 contrib/mkdocs/README.md create mode 100644 contrib/mkdocs/mkdocs.yml diff --git a/contrib/mkdocs/README.md b/contrib/mkdocs/README.md new file mode 100644 index 0000000000..63a554352c --- /dev/null +++ b/contrib/mkdocs/README.md @@ -0,0 +1,61 @@ +## Install mkdocs https://www.mkdocs.org/ + +``` + python3 -m pip install --user mkdocs + python3 -m pip install --user mkdocs-material +``` + +## Install the MkDocs plugin that simplifies internal links creation + +``` + git clone https://github.com/cmitu/mkdocs-altlink-plugin + cd mkdocs-altlink-plugin + python3 -m pip install --user -e . +``` + +# Edit the configuration +``` +mkdocs.yml +``` +https://www.mkdocs.org/#theming-our-documentation +https://www.mkdocs.org/user-guide/plugins/ + +## Checkout the Markdown source of the Wiki pages +``` +git clone https://github.com/nwchemgit/nwchem-wiki docs +``` + +## Test the changes + +``` +mkdocs serve +``` + +## Build the html +``` +mkdocs build +``` + +## Create gh-pages branch (if needed) + +**Need to do it only once! +The second time will wipe out the whole existing branch ...** +``` +cd /path/to/repo-gh-pages +git symbolic-ref HEAD refs/heads/gh-pages +rm .git/index +git clean -fdx +echo "My GitHub Page" > index.html +git add . +git commit -a -m "First pages commit" +git push origin gh-pages +``` + +## push files to gh-pages branch + +``` +cd /path/to/repo-gh-pages +rsync -av /path/to/mkdocs/site/* . +git commit -m +git push +``` diff --git a/contrib/mkdocs/mkdocs.yml b/contrib/mkdocs/mkdocs.yml new file mode 100644 index 0000000000..60ce800411 --- /dev/null +++ b/contrib/mkdocs/mkdocs.yml @@ -0,0 +1,27 @@ +site_name: NWChem +repo_url: https://github.com/nwchemgit/nwchem-wiki +edit_uri: blob/master/ +theme: + name: readthedocs + prev_next_buttons_location: both +use_directory_urls: false +plugins: + - search + - alternate-link +nav: + - Documentation Home: Home.md + - Overview.md + - System-Description.md + - Quantum-Mechanical-Methods.md + - Classical-Methods.md + - Hybrid-Approaches.md + - Potential-Energy-Surface-Analysis.md + - Electronic-Structure-Analysis.md + - Other-Capabilities.md + - Examples.md + - Supplementary-Information.md + - Compiling-NWChem.md + - Developer.md + - Benchmarks.md + - FAQ.md + - Known-Bugs.md From 303e2490b175d5681d64b9222fb171e08624a5b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edoardo=20Apr=C3=A0?= Date: Thu, 4 Jun 2020 18:50:44 -0700 Subject: [PATCH 2/3] Update --- contrib/mkdocs/README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/contrib/mkdocs/README.md b/contrib/mkdocs/README.md index 63a554352c..81c9ac8183 100644 --- a/contrib/mkdocs/README.md +++ b/contrib/mkdocs/README.md @@ -17,15 +17,17 @@ ``` mkdocs.yml ``` -https://www.mkdocs.org/#theming-our-documentation -https://www.mkdocs.org/user-guide/plugins/ +https://www.mkdocs.org/#theming-our-documentation +https://www.mkdocs.org/user-guide/plugins/ ## Checkout the Markdown source of the Wiki pages ``` git clone https://github.com/nwchemgit/nwchem-wiki docs ``` -## Test the changes +## Test the changes + +The file `index.md` is the main file ``` mkdocs serve From 836d410f6cebcc570281e67838f5d621a39b6700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edoardo=20Apr=C3=A0?= Date: Thu, 4 Jun 2020 18:53:55 -0700 Subject: [PATCH 3/3] update --- contrib/mkdocs/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/mkdocs/README.md b/contrib/mkdocs/README.md index 81c9ac8183..e0fa1a08f6 100644 --- a/contrib/mkdocs/README.md +++ b/contrib/mkdocs/README.md @@ -32,6 +32,7 @@ The file `index.md` is the main file ``` mkdocs serve ``` +Point your browser to http://127.0.0.1:8000 ## Build the html ``` @@ -61,3 +62,8 @@ rsync -av /path/to/mkdocs/site/* . git commit -m git push ``` + +# Browse new web pages +https://edoapra.github.io/nwchem/ +or in future +https://nwchemgit.github.io/nwchem/