Giter Site home page Giter Site logo

EmbedJournal Jekyll Template

Installation:

Build Dependencies:

The build process and internal tools reqire the following dependecies. Make sure you have perl and cpan installed. To build some native modules you will need build essentials too.

sudo apt-get update
$ sudo apt install build-essential
$ sudo apt-get install perl git curl wget gnupg2
$ cpan -i 'YAML::XS'

$ sudo apt install install php7.0 php7.0-curl libapache2-mod-php7.0
 # alternatively, (when php7 is not available)
$ sudo apt install install php5 php5-curl libapache2-mod-php5

Clone Repo

Clone and update submodules with the following commands.

$ git clone https://gitlab.com/embedjournal/jekyll-depot.git ej-jekyll
$ cd ej-jekyll/content && git submodule init && git submodule update

Mailchimp Integration:

All PHP code required to subscribe a user to EJ mailing list is already present in the source tree and no changes are required. For protection of privacy reasons, we keep the API Key in a separate file which is not in VCS.

Put the API Key in the following format and place it in jekyll/assets/php/config.ini

api_key = your-api-key

RVM, Ruby and Gem

Install RVM:

Before installing RVM first we need to import public key in our system then use curl to install rvm in our system.

$ gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
$ curl -sSL https://get.rvm.io | bash -s stable

After installing RVM first we need to set up rvm environment using below command. so that current shell takes new environment settings.

$ source /home/${USER}/.rvm/scripts/rvm # for non-root users
$ source /etc/profile.d/rvm.sh          # for roor

You might want to append the following to your bashrc if you don't what to keep sourcing rvm scripts manually.

if [ -f /home/${USER}/.rvm/scripts/rvm ]; then
        source /home/${USER}/.rvm/scripts/rvm

        # Add RVM to PATH for scripting. Make sure this is the last PATH
        # variable change.
        export PATH="$PATH:/home/${USER}/.rvm/bin"
fi

Install Ruby Dependencies:

Install all the dependencies for installing Ruby automatically on system using below command.

$ rvm requirements

List Available Ruby Versions

Now use following command to get a list of available ruby versions, which we can install on system. Install Ruby version of your choice (requirement ) in next step.

$ rvm list known

Install Ruby Version

RVM provides option to manage multiple ruby version on single system. Use following command to install required version of Ruby. As below example we are installing Ruby 2.2.4 on our system.

$ rvm install 2.4.1

Setup Default Ruby Version

Use rvm command to set up default ruby version to be used by applications. You may also install multiple versions of ruby using above step command and select which version you want to use.

$ rvm use 2.4.1 --default

Check Ruby Version

$ ruby --version

Install and Configure Apache

We will use Apache as our HTTP server. Build script will attempt to build the site to /var/www/embedjoural.com/public_html. Make sure that this directory is present and writable.

sudo apt-get install apache2 libapache2-mod-php7.0
sudo mkdir -p /var/www/embedjournal.com/public_html
sudo chown $USER:$USER /var/www/embedjournal.com/public_html

Enable mode_rewrite in apache2 and setup a new site with DocumentRoot at /var/www/embedjoural.com/public_html.

sudo a2enmod ssl
sudo a2enmod rewrite

cat > /etc/apache2/sites-available/embedjournal.conf << EOF
<VirtualHost *:80>
	ServerName loc.embedjournal.com
	ServerAdmin [email protected]
	DocumentRoot /var/www/embedjournal.com/public_html

	ErrorLog ${APACHE_LOG_DIR}/ej_error.log
	CustomLog ${APACHE_LOG_DIR}/ej_access.log combined
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
EOF

sudo a2ensite embedjournal.conf
sudo service apache2 restart

Edit /etc/hosts file (C:\Windows\System32\drivers\etc\hosts) and add the following line.

127.0.0.1       loc.embedjournal.com

Jekyll, Bundler and Build

Since we alreay have ruby and gems installed, we can install Jekyll just as any other gem. So let's go ahead and install jekyll and bundler.

$ gem install jekyll bundler

Now, we have met all ruby, jekyll related dependencies. Time to meet embedjournal's dependencies (sigh!). Since we have bundler, this is quite simple.

$ cd ej-jekyll/jekyll/
$ bundle install

Now we have installed everything you need to build embedjournal.com, time to build.

$ ./fervour --build

See what else you can do with "fervour" - our build assistant!

$ ./fervour --help

EmbedJournal's Projects

embedjournal icon embedjournal

Jekyll configuration files and liquid HTML blades for embedjournal.com. This repository is for site developers and authors

jekyll-depot icon jekyll-depot

Jekyll configuration files and liquid HTML blades for embedjournal.com. This repository is for site developers

web-content icon web-content

EmebdJournal.com's public web content. Arranged/split so authors can work on content creation without distraction

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.