Giter Site home page Giter Site logo

weka-wiki's Introduction

Weka Wiki

Not really a wiki, but replacing some of the content that was hosted on weka.wikispaces.com before it shut down. Uses mkdocs to generate the content.

The wiki can be found at this location:

https://waikato.github.io/weka-wiki/

Please note, this is still work in progress!

Installation

mkdocs works with Python 2.7 and 3.x.

Best approach is to install mkdocs (>= 0.16.0) in a virtual environment (venv directory):

  • Python 2.7

    virtualenv -p /usr/bin/python2.7 venv
    
  • Python 3.6 (Python 3.5 works as well)

    virtualenv -p /usr/bin/python3.6 venv
    
  • Install the mkdocs package

    ./venv/bin/pip install mkdocs
    

Content

In order for content to show up, it needs to be added to the configuration, i.e., in the pages section of the mkdocs.yml file.

Some pointers:

Build

mkdocs is used to generate HTML from the markdown documents and images:

./venv/bin/mkdocs build --clean

Testing

You can test what the site looks like, using the following command and opening a browser on localhost:8000:

mkdocs monitors setup and markdown files, so you can just add and edit them as you like, it will automatically rebuild and refresh the browser.

./venv/bin/mkdocs build --clean && ./venv/bin/mkdocs serve

Deploying

You can deploy the current state to Github pages with the following command:

./venv/bin/mkdocs gh-deploy --clean

jenkins on CentOS

CentOS does not have Python 3.5 packages directly available through packages, but rather through software collections (scl).

Python 3.5 is enabled like this (from an interactive shell):

/bin/scl enable rh-python35 bash

Assuming that the weka-wiki repo is installed in /var/lib/jenkins/repos/weka-wiki, you can use the Execute shell build step with this script to automatic deploy the github pages if the repo has changed:

cd /var/lib/jenkins/repos/weka-wiki
COUNT=`git pull | grep -v "Already up-to-date" | wc -l`
if [ $COUNT -gt 0 ]
then 
  /bin/scl enable rh-python35 - << \EOF
cd /var/lib/jenkins/repos/weka-wiki
/var/lib/jenkins/repos/weka-wiki/venv/bin/mkdocs gh-deploy
EOF
fi

For getting the jenkins user to deploy to github, you need to:

  • create an ssh key as user jenkins

    ssh-keygen -t rsa -f ~/.ssh/github_wekawiki
  • add the following to ~/.ssh/config

    Host github-wekawiki
       HostName github.com
       User git
       IdentityFile ~/.ssh/github_wekawiki
       IdentitiesOnly yes
    
  • add the public ssh key under the repo's Settings -> Deploy keys with write access

  • update the .git/config file in the checked out repo, changing the remote origin URL to this (using the just created identity):

    url = git@github-wekawiki:Waikato/weka-wiki.git
    

weka-wiki's People

Contributors

eibe avatar fracpete avatar

Watchers

 avatar  avatar

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.