Steps to contribute documentation to the Techjoomla Site.
- Fork the repo Techjoomla Documentation Repo
- Git clone your fork to your machine. Command Syntax -
git clone fork-link
- Add remote upstream by command
git remote add upstream [email protected]:techjoomla/techjoomla.github.io.git
- Check upstream with command
git remote -v
- Make filemode off in config file. File Path -
/techjoomla.github.io.git/.git/config
. Make sure you can see the .git hidden folder byCtrl + h
- Install Ruby -
sudo apt-get install ruby-full
. - Check Ruby installed correctly by command -
ruby -v
. It should beminimum 2.1.0
- Install Bundler -
sudo apt-get install bundler
. - Check Bundler installed correctly by command -
bundle -v
. It should beminimum 1.15.3
- Go to the root folder of project. i.e.
/techjoomla.github.io
- Install Rubygems -
sudo bundle install
.
- Start the development server with command
bundle exec jekyll serve
- It will give you the link where you can see the changes. In most of the cases it is
http://127.0.0.1:4000
- Inside _post folder create a new md file format
YYYY-MM-DD-filename.md
- Open the same file you created and add front matter
title & description are used as meta data of page and also used on homepage and related post data. showSidebar adds page on homepage and sidebar, in case of its absence or false value it will not be added. nav_ordering is the ordering value of the menu under its category.
--- date: 2017-01-15 title: Post Title description: Post Description pageTitle: Page Title categories: - CategoryName tags: - Tag 1 - Tag 2 type: Document nav_ordering: 2 showSidebar: true published: true ---
- This will add a section on homepage with Category name and a post under it. The post will be generated with url -
domainname.com/categoryname/filename
- Add below the front matter your content to be added on that post. To know markdown follow this link
- Inside _post folder create a new md file format
YYYY-MM-DD-filename.md
- Open the same file you created and add front matter
--- date: 2017-01-15 id: youtube-video-id title: Post Title description: Post Description categories: - CategoryName type: Video nav_ordering: 2 showSidebar: true published: true ---
- Inside _data folder open
navigation.yml
file. - Add Menu item -
- name: Link Name link: /link-url/
Folder Name | Description |
---|---|
css | Do not edit any file here. This is autogenerated by SASS |
_data | Contains Navigation and Footer data. |
images | Put your all images here. |
_includes | This folder contains common reusable html structures. |
js | Include Js here |
_layouts | This folder contains the layouts / templates |
_posts | Add posts inside this folder |
_sass | Add CSS here |
_site | This is your output html |
config.yml |
- Never ever write in css file directly. Add it in scss/sass folder files. Otherwise you may loose the changes.