Built with Bootstrap 4
- Install Docker.
- Fork and clone the repository. For solely local testing, just cloning will do.
- Ensure port
4000
is unused, or change the line4000:4000
to{your_desired_port}:4000
indocker-compose.yml
. cd
into the repo and rundocker compose up
. You may also need to trydocker-compose up
or givesudo
access depending on your platform.- Open
localhost:4000
. (localhost:{your_desired_port}
if you changed the port indocker-compose.yml
.)
Note: we used github pages during site construction, that is being discontinued henceforth (since deployment to permanent server) due to issues with baseurl and _config.yml
- Install jekyll and associated dependencies, like bundler, Ruby, etc.
- Fork and clone the repository. For solely local testing, just cloning will do.
- cd into the repo folder and run
bundle exec jekyll serve
. See jekyll docs for more details. - Navigate to
localhost:4000/
(by default)
As of now, we're employing a very rudimentary deployment system, essentially scp-ing the built site into the server.
The basic steps are highlighted hence:
- Build the site (available at _site/)
- scp all contents of _site/ into the site/ directory of the server home
Suggestions welcome
- Create an account on GitHub if you don't already have one.
- Fork this repo on GitHub (click Fork button) (if you don't have master access)
- Clone to computer (
git clone git://github.com/<your_username>/website_2019.git
for forks. If you have master access, usegit clone git://github.com/IIIT-ECell/website_2019.git
) - Don't forget to cd into your repo: (
cd website_2019/
) - Set up remote upstream (
git remote add upstream git://github.com/IIIT-ECell/website_2019.git
) (for forks). - Create a branch for new issue. Branches with meaningful names are appreciated. (
git checkout -b 404-new-feature
) - Develop on issue branch. (Time passes, the main repository accumulates new commits)
- Commit changes to your local issue branch. Meaningful commit messages are appreciated. Don't commit all your work at once and don't spam the commit history with 1000s of commits (
git add <file(s)>; git commit -m 'a nice commit message'
) - Fetch upstream (
git fetch upstream
) (for those with master access, fetch origin) - Update local master (
git checkout master; git merge upstream/master
) - Rebase issue branch (
git checkout 404-new-feature; git rebase master
) - Repeat steps 6-11 until the work is finished.
- Push branch to GitHub (
git push origin 404-new-feature
) - Start your browser, go to your GitHub repo, switch to "404-new-feature" branch and press the [Pull Request] button
- After making a pull request, it is not recommended to pull/merge anymore. If you absolutely have to make any changes to the code (a rebase for example), use
git push <remote> <branch> --force
to send the new commits to your branch, which also updates your pull request on GitHub. - After the pull request has been merged, delete this branch locally and on remote. However, if you plan on doing similar work, you may keep it.
- Update your local master branch with the code that got merged (
git checkout master; git pull upstream master
)
NOTE: if git:// doesn't work for you, try using https://
After you set up the repo locally, run npm install
.
Features:
- This sets up a git hook which runs whenever you stage files. It automatically prettifies your files [js, css for now].
- Run
npm run dist
to build the site. It also
- minifies js files
- adds browser prefixes to css files and minifies them
- minifies html files
- Run
npm run deploy
to build the site and deploy it to ecell server [you must have your ssh keys on the server for this]
// Reference: http://lea.verou.me/2011/10/easily-keep-gh-pages-in-sync-with-master/
$ git add .
$ git status // to see what changes are going to be commited
$ git commit -m 'Some descriptive commit message'
$ git push origin master
$ git checkout gh-pages // go to the gh-pages branch
$ git rebase master // bring gh-pages up to date with master
$ git push origin gh-pages // commit the changes
$ git checkout master // return to the master branch
Main changes are incorporated from branches into master, then into gh-pages. Ideally.