-
Notifications
You must be signed in to change notification settings - Fork 108
Setting up Jekyll locally
Get a local copy of fossasia.github.io (fork and clone).
We'll first need to install Bundler, which is a package manager for Ruby. Run gem install bundler
in the command line.
Next, navigate to the fossasia.github.io
directory from the command line. Run bundle install
. This installs the github-pages
gem, the one we use to build the site exactly as github builds it.
On success, run bundle exec jekyll serve
. The repository will be compiled and served on a static server. Visit http://localhost:4000/ to view the site.
Linting is to run tools that analyse the code for potential errors. FOSSASIA's GCI site lints JavaScript and CSS for stylistic and syntax errors. The Gulp build system is used to lint files.
First, install gulp globally by running `npm install -g gulp.
Next, run npm install
inside the project folder. This will install the required dependencies.
After that, run gulp
. Now you are linting using the configuration inside gulpfile.js
and .jscsrc
, exactly the way travis does it.
During bundle install
, if you encounter Gem::InstallError: The 'RedCloth' native gem requires installed build tools.
, download DevKit from RubyInstaller's Downloads and follow the instructions.
If you see Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
, or, An error occurred while installing rdiscount (2.1.7), and Bundler cannot continue. Make sure that 'gem install rdiscount -v '2.1.7'' succeeds before bundling.
- try to run gem install rdiscount -v
.