Website Maintenance Tips

Deploying the Static Jekyll Website from Local Repository to GitHub gh-pages Branch

While using custom or unsupported plugins, it is necessary to upload the static website files, already built on the local repository to the GitHub repository and choose the website to be loaded from that.

Install and Run Jekyll Github Deploy

gem install jgd
jgd

Alternative: Use Git

First push everything from the local repo to the master branch. Then:

git checkout master
rm -rf _site
git clone -b gh-pages `git config remote.origin.url` _site
jekyll build
cd _site
git add -A
git commit -am 'Static Pages Built'
git push

Reference

Change GitHub Settings

Settings > GitHub Pages > Source > gh-pages branch > Save

Page Layouts

Page layout for pages without the sidebar is ‘splash’. Default page layout can be changed in ‘_config.yml’.

Add Wiki as Submodule

In the main repo:

git submodule add https://github.com/ipop-project/ipop-project.github.io.wiki.git wiki
git commit -m "Wiki Added as a Submodule"

Remove Wiki Submodule

Delete the relevant section from the .gitmodules file.

Stage the .gitmodules changes git add .gitmodules.

Delete the relevant section from .git/config.

Run git rm --cached wiki/.

Run rm -rf .git/modules/wiki.

Commit git commit -m "Wiki Submodule Removed".

Delete the now untracked submodule files rm -rf wiki.

Reference

Add YAML Front Matter to Wiki MarkDown Source Files

Use Jekyll Optional Front Matter plugin.

Importing Wiki into Jekyll Website

In order to make relative links in wiki pages work correctly inside Jekyll website, remove the / from the end of the following line in _config.yml:

permalink: /:categories/:title/

Redirect Wiki Home

Utilizing a Redirected Layout

This technique would allow you to set up redirects for your pages without resorting to any plugin. All you need to do is create a layout named redirected.html in your _layouts folder. The content of this layout would be as shown below:

<!DOCTYPE html>
<html>
<head>
<link rel="canonical" href=""/>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="0;url=" />
</head>
<body>
      <a href="">Redirecting ...</a>
      <script>location=''</script>
</body>
</html>

Once you have this layout ready, then to set up redirect from any page, all you need to do is specify redirected as your layout in its YAML front matter and specify the destination in redirect_to as shown below. in wiki.md:

---
layout: redirected
sitemap: false
permalink: /wiki/
redirect_to:  Home
---

Note that, I have also included sitemap: false in the front matter as I don’t want the redirected pages to be included in the sitemap.

Reference

Add Table of Contents to the Wiki Pages

jekyll-toc

Note: This plugin doesn’t work on GitHub. So we have to build it locally and then upload the _site directory to gh-pages branch and change the GitHub settings so that it loads the website from gh-pages branch instead of master branch.

To make it appear in all the wiki pages automatically, add toc: true to the wiki layout settings defaults in _config.yml:

  # wiki
  - values:
      toc: true

Integrate Wiki Sidebar into the Website

Remove default layout and sidebar from _Sidebar.html. Exclude everything except `

Use IPOP on Windows, Manually

Warning: This document may be out of date.

  Description
Tested on Microsoft Windows 10 x64
Time ~ 10 Minutes
Question(s) - How to install IPOP?
- How to run IPOP?
- How to remove IPOP?
Objective(s) - Install IPOP
- Run IPOP
- Stop IPOP
- Remove IPOP

Installing IPOP-VPN on Windows

Quick start Installation

The most convenient way to get IPOP installed on Windows 10 is run the ipop-set.ps1 powershell script included in the IPOP ZIP file. Note that you need to have Administrator privileges to install IPOP-VPN.

  1. Download IPOP-VPN for Windows.

  2. Extract the contents of the archive to a directory, e.g., ipop-vpn

  3. Start an Admin Windows Powershell and change to the ipop-vpn directory previously created

  4. Enter the following commands:
     PowerShell -ExecutionPolicy Unrestricted
     .\ipop-setup
    
  5. Follow the prompts to install and setup IPOP

  6. While installing Social VPN, copy the “ip4” entry from “AddressMapper” to “CFx”, e.g.,
     ip4": "172.31.0.100" 
    
  7. Finally, double click ipop-start to run IPOP. Closing this console window will terminate IPOP.

Note: A Windows Firewall exception is created for IPOP-VPN, but you have to create your own for exceptions for other services such as ICMP Echo (ping).

TLDR

If you are using an earlier version of Windows such as 7, 8, Server 2008, or 2012, you will need to manually setup IPOP. Below are the necessary steps to accomplish this.

Manual Setup

  1. Install MS Visual C++ x86 Redistributable Packages for Visual Studio 2010.

  2. Install Python 3.5 for Windows.

  3. Install tap-installer from OpenVPN.

  4. Download IPOP-VPN for Windows.

  5. Extract the contents of the archive to a directory, e.g., ipop-vpn

  6. Decide if you want to run GroupVPN or Social VPN and copy the appropriate sample config to the ipop-vpn directory. Use one of the following for group or social VPN respectively:
     cp .\controller\modules\sample-gvpn-config.json .\config.json
    
     cp .\controller\modules\sample-svpn-config.json .\config.json
    
  7. Update your config file with your XMPP credentials and other details. For SocialVPN you only need to add the XMPP server IP, your XMPP client user id and password. For GroupVPN you will need to add your static virtual IP.

  8. Install Sleek XMPP. Python will have to be in your PATH environment or you will need to provide the path to the pip executable. pip install sleekxmpp

  9. Rename the TAP-Windows Adapter to ipop. From the Control Panel choose View network status and tasks under Network and Internet. On the right side-bar click change adapter settings. Select the TAP Windows Adapter V9 and rename it to “ipop”.

  10. Configure the IPOP Adapter IPv4 interface with a static IP address and subnet mask that will be use for the virtual network. Alternatively you can download download set_interface and [win32_netsh_setup] (https://github.com/ipop-project/Release-Management/blob/master/Deployment/win/win32_netsh_setup.py) to your IPOP directory and run the _setup_interface.bat _ batch file as Admin.

  11. Finally, double click ipop-start to run IPOP

Key Points Summary

Enter the following commands:

PowerShell -ExecutionPolicy Unrestricted
.\ipop-setup

. Check the default.html` content.

use jekyll-include-absolute-plugin to add support for including files outside the _includes directory.

Note: This plugin doesn’t work on GitHub. So we have to build it locally and then upload the _site directory to gh-pages branch and change the GitHub settings so that it loads the website from gh-pages branch instead of master branch.

Include _Sidebar.md to the Jekyll include list in _config.yml:

include:
  - _Sidebar

«««< HEAD Insert the sidebar in the wiki template wiki.html:

---
layout: default
---






<div id="main" role="main">
  <div class="sidebar">
    <nav class="nav__list">
      <div class="wiki-top-links">
        <a href="../wiki">Wiki Home</a> / <a href="../wikipages">Wiki Pages</a>
      </div>
        { % include_absolute _site/wiki/_Sidebar.html %} <!-- REMOVE THE SPACE BETWEEN { and % BEFOR PUBLISHING. -->
    </nav>
  </div>

  <article class="page" itemscope itemtype="http://schema.org/CreativeWork">
    
    
    
    

    <div class="page__inner-wrap">
      <section class="page__content" itemprop="text">


        



<div id="main" role="main">
  <article class="page" itemscope itemtype="http://schema.org/CreativeWork">
    
    
    
    

    <div class="page__inner-wrap">
      <section class="page__content" itemprop="text">

        <aside class="sidebar__right">
          <nav class="toc">
            <header><h4 class="nav__title"><i class="fa fa-file-text"></i> On This Page</h4></header>
            <ul class="section-nav">
<li class="toc-entry toc-h1"><a href="#use-ipop-on-windows-manually">Use IPOP on Windows, Manually</a>
<ul>
<li class="toc-entry toc-h2"><a href="#installing-ipop-vpn-on-windows">Installing IPOP-VPN on Windows</a>
<ul>
<li class="toc-entry toc-h3"><a href="#quick-start-installation">Quick start Installation</a></li>
<li class="toc-entry toc-h3"><a href="#tldr">TLDR</a></li>
<li class="toc-entry toc-h3"><a href="#manual-setup">Manual Setup</a></li>
</ul>
</li>
</ul>
</li>
<li class="toc-entry toc-h1"><a href="#key-points-summary">Key Points Summary</a></li>
</ul>
          </nav>
        </aside>

        <h1 id="use-ipop-on-windows-manually">Use IPOP on Windows, Manually</h1>

<p><strong>Warning: This document may be out of date.</strong></p>

<table>
  <thead>
    <tr>
      <th> </th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><strong>Tested on</strong></td>
      <td>Microsoft Windows 10 x64</td>
    </tr>
    <tr>
      <td><strong>Time</strong></td>
      <td>~ 10 Minutes</td>
    </tr>
    <tr>
      <td><strong>Question(s)</strong></td>
      <td>- How to install IPOP?<br /> - How to run IPOP?<br /> - How to remove IPOP?</td>
    </tr>
    <tr>
      <td><strong>Objective(s)</strong></td>
      <td>- Install IPOP<br /> - Run IPOP<br /> - Stop IPOP<br /> - Remove IPOP</td>
    </tr>
  </tbody>
</table>

<h2 id="installing-ipop-vpn-on-windows">Installing IPOP-VPN on Windows</h2>

<h3 id="quick-start-installation">Quick start Installation</h3>
<p>The most convenient way to get IPOP installed on Windows 10 is run the <em>ipop-set.ps1</em> powershell script included in the IPOP ZIP file. Note that you need to have Administrator privileges to install IPOP-VPN.</p>

<ol>
  <li>
    <p>Download <a href="https://github.com/ipop-project/Downloads/releases/download/v16.08.0/ipop-v16.08.1_win.zip">IPOP-VPN for Windows</a>.</p>
  </li>
  <li>
    <p>Extract the contents of the archive to a directory, e.g., ipop-vpn</p>
  </li>
  <li>
    <p>Start an Admin Windows Powershell and change to the ipop-vpn directory previously created</p>
  </li>
  <li>Enter the following commands:
    <div class="highlighter-rouge"><pre class="highlight"><code> PowerShell -ExecutionPolicy Unrestricted
 .\ipop-setup
</code></pre>
    </div>
  </li>
  <li>
    <p>Follow the prompts to install and setup IPOP</p>
  </li>
  <li>While installing Social VPN, copy the “ip4” entry from “AddressMapper” to “CFx”, e.g.,
    <div class="highlighter-rouge"><pre class="highlight"><code> ip4": "172.31.0.100" 
</code></pre>
    </div>
  </li>
  <li>Finally, double click ipop-start to run IPOP. Closing this console window will terminate IPOP.</li>
</ol>

<p>Note: A Windows Firewall exception is created for IPOP-VPN, but you have to create your own for exceptions for other services such as ICMP Echo (ping).</p>

<h3 id="tldr">TLDR</h3>
<p>If you are using an earlier version of Windows such as 7, 8, Server 2008, or 2012, you will need to manually setup IPOP. Below are the necessary steps to accomplish this.</p>

<h3 id="manual-setup">Manual Setup</h3>
<ol>
  <li>
    <p>Install <a href="https://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe'">MS Visual C++ x86 Redistributable Packages for Visual Studio 2010</a>.</p>
  </li>
  <li>
    <p>Install <a href="https://www.python.org/ftp/python/3.5.2/python-3.5.2-amd64-webinstall.exe">Python 3.5 for Windows</a>.</p>
  </li>
  <li>
    <p>Install <a href="https://swupdate.openvpn.org/community/releases/tap-windows-9.21.2.exe">tap-installer from OpenVPN</a>.</p>
  </li>
  <li>
    <p>Download <a href="https://github.com/ipop-project/Downloads/releases/download/v16.08.1/ipop-v16.08.1_win.zip">IPOP-VPN for Windows</a>.</p>
  </li>
  <li>
    <p>Extract the contents of the archive to a directory, e.g., ipop-vpn</p>
  </li>
  <li>Decide if you want to run <a href="Planning Your Network">GroupVPN or Social VPN</a> and copy the appropriate sample config to the ipop-vpn directory. Use one of the following for group or social VPN respectively:
    <div class="highlighter-rouge"><pre class="highlight"><code> cp .\controller\modules\sample-gvpn-config.json .\config.json
</code></pre>
    </div>
    <div class="highlighter-rouge"><pre class="highlight"><code> cp .\controller\modules\sample-svpn-config.json .\config.json
</code></pre>
    </div>
  </li>
  <li>
    <p>Update your <a href="Configuration">config file</a> with your XMPP credentials and other details. For SocialVPN you only need to add the XMPP server IP, your XMPP client user id and password. For GroupVPN you will need to add your static virtual IP.</p>
  </li>
  <li>
    <p>Install Sleek XMPP. Python will have to be in your PATH environment or you will need to provide the path to the pip executable.
pip install sleekxmpp</p>
  </li>
  <li>
    <p>Rename the TAP-Windows Adapter to <em>ipop</em>. From the Control Panel choose <em>View network status and tasks</em> under Network and Internet. On the right side-bar click <em>change adapter settings</em>. Select the <em>TAP Windows Adapter V9</em> and rename it to “ipop”.</p>
  </li>
  <li>
    <p>Configure the IPOP Adapter IPv4 interface with a static IP address and subnet mask that will be use for the virtual network. Alternatively you can download download <a href="https://github.com/ipop-project/Release-Management/blob/master/Deployment/win/setup_interface.bat">set_interface</a> and [win32_netsh_setup] (https://github.com/ipop-project/Release-Management/blob/master/Deployment/win/win32_netsh_setup.py) to your IPOP directory and run the _setup_interface.bat _ batch file as Admin.</p>
  </li>
  <li>Finally, double click ipop-start to run IPOP</li>
</ol>

<hr />

<h1 id="key-points-summary">Key Points Summary</h1>

<p>Enter the following commands:</p>

<div class="highlighter-rouge"><pre class="highlight"><code>PowerShell -ExecutionPolicy Unrestricted
.\ipop-setup
</code></pre>
</div>




      </section>
    </div>
  </article>
    <div class="sidebar">
    <nav class="nav__list">
      <div class="wiki-top-links">
        <a href="../wiki" class="display-unset">Wiki Home</a> / <a href="../wikipages" class="display-unset">Wiki Pages</a>
      </div>
      

    



        <ul>
  <li><strong>Deploying IPOP-VPN</strong>
    <ul>
      <li><a href="Use-IPOP,-Intro">Installation</a></li>
      <li><a href="Configuration,-Intro">Configuration</a></li>
    </ul>
  </li>
  <li><strong>Tutorials</strong>
    <ul>
      <li><a href="Switchmode-with-LXC">Running IPOP in Switchmode</a></li>
    </ul>
  </li>
  <li><strong>Development Guide</strong>
    <ul>
      <li><a href="Development-Workflow">Development Workflow</a></li>
      <li><a href="Coding-Guidelines">Coding Guidelines</a></li>
      <li><a href="Build-IPOP,-Intro">Building the Code</a></li>
      <li><a href="IPOP-Scale-test-Walkthrough">Testing Your Build</a></li>
      <li><a href="Controller-Framework">Controller Framework</a></li>
      <li><a href="Controller-API">Controller API</a></li>
      <li><a href="Build-WebRTC-Libraries,-Intro">Building WebRTC Libraries</a></li>
    </ul>
  </li>
  <li><strong>General Documentation</strong>
    <ul>
      <li><a href="FAQs">FAQs</a></li>
      <li><a href="Troubleshooting">Troubleshooting</a></li>
      <li><a href="Planning-Your-Network">Planning Your Network</a></li>
      <li><a href="Coding-Challenges">Coding Challenges</a></li>
      <li><a href="Known-Issues">Known Issues</a></li>
      <li><a href="Getting-Help">Getting Help</a></li>
      <li><a href="How-to-Contribute">How to Contribute</a></li>
    </ul>
  </li>
</ul>








    </nav>
  </div>
</div>




      </section>
    </div>
  </article>
</div>

======= Insert the sidebar in the wiki template wiki.html. Check the file content.

3712c774e659b6c383ca5af4c5c987c331bf3470

Add proper styles to main.scss:

.layout--wiki .sidebar .nav__list strong {
  display: block;
  margin: 0.5rem 0;
  padding: 0.5rem 0;
  font-family: -apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  border-bottom: 1px solid #f2f3f3;
}

.layout--wiki .sidebar .wiki-top-links {
  font-size: .775em;
}

.layout--wiki .sidebar li {
  font-size: .85em;
}