-
Notifications
You must be signed in to change notification settings - Fork 146
Updating the EGSnrc web page
There is a single EGSnrc web page hosted via github pages at
http://nrc-cnrc.github.io/EGSnrc/. The EGSnrc manuals are prominently
accessible at the top of this page for convenience. The web site files are
served directly from the gh-pages
branch of the repository, which is
automatically served on the github.io domain. This branch can be viewed on
github, or checked out from a local clone with git checkout gh-pages
.
The content of the gh-pages
branch is downloaded in every clone the EGSnrc
repository, hence committing new binary files for the manuals will rapidly
bloat the whole project. Removing the files under doc/
is not sufficient
because they remain in the git history. To update the documentation, first
prune the previous binary files from the repository history (starting from the
first commit e400c8d
on the gh-pages
branch):
git clone --branch gh-pages --single-branch git@github.com:nrc-cnrc/EGSnrc.git EGSnrc-gh-pages
cd EGSnrc-gh-pages
start=$(git rev-list --first-parent gh-pages | tail -1)
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch doc/' -- $start..gh-pages
rm -rf .git/refs/original/
git reflog expire --expire=now --all
git gc --aggressive --prune=now
Then create a new doc
directory and copy the new pdfs there so it contains:
EGSnrc-manuals.zip
getting-started.pdf
pirs3100/
pirs3100-g-refman.pdf
pirs509a-beamnrc.pdf
pirs509c-beamdp.pdf
pirs509e-beamdp-utility.pdf
pirs509f-statdose.pdf
pirs623-gui.pdf
pirs624-dosxyzshow.pdf
pirs701-egsnrc.pdf
pirs702-egsnrc-codes.pdf
pirs794-dosxyznrc.pdf
pirs801-egsinprz.pdf
pirs898/
where the EGSnrc-manuals.zip
file is an archive of an EGSnrc-manuals
directory which contains the other pdf files and zipped directories of the html
manuals: pirs3100.zip
and pirs898.zip
.
To do this, you could do:
mkdir doc; cd doc
cp $HEN_HOUSE/doc/src/*.pdf ./
cp -r $HEN_HOUSE/doc/src/pirs3100-g-html ./pirs3100
cp -r $HEN_HOUSE/doc/src/pirs898-html ./pirs898
zip -r pirs3100.zip pirs3100
zip -r pirs898.zip pirs898
zip EGSnrc-manuals.zip *.pdf *.zip
rm pirs3100.zip pirs898.zip; cd ..
Finally, commit and force push changes:
git add doc
git commit -a
git push --force-with-lease origin gh-pages
- Overview
- Install on VirtualBox
- Install on Linux
- Install on macOS
- Install on Windows
- Quick installation
- Upgrading