Giter Site home page Giter Site logo

documentation's Introduction

Gardener Documentation

Overview of CI/CD build

image

Documentation (this repository)

https://github.com/gardener/documentation/ contains the real content of the Landing page. Add/Remove/Modify/ pages or content here

Generator

https://github.com/gardener/website-generator contains the site generator Hugo and all the layout and js stuff.

Website

The Repository https://github.com/gardener/website/ contains the generated Landing page. All manual changes get lost.

Contribute

Add a new page

All content for your website will live inside the ./website/documentation directory. Each top-level folder in Hugo is considered a content section. For example, if your site has three main sections โ€” blog, getting-started, and tutorials โ€” you will have three directories at ./website/documentation/010-blog, ./website/documentation/020-getting-started, and ./website/documentation/050-tutorials.

Order of content

Normally, the top navigation of a Hugo site is ordered by a weight attribute in the front matter section of the _index.md file. For this website, I decide to use the directory order and put a number in front of each directory. With this method, the directory order is synchronized with the menu order. This is more convenient for a content developer to navigate between website and content.

Kind of pages

This website supports three kind of pages:

  • local
  • remote
  • repository

Local page

A local page is nothing special for hugo. A good example for a local page is the ./website/documentation/060-curated-links/_index.md file.

Remote Page

a remote page contains the front matter section with the reference to the remote md file. Good example is ./website/documentation/020_getting-started/_index.md

Remote Repository

A remote repo contains just the front matter section. The real content is crawled during the build process. A good example is the ./website/documentation/050-tutorials/content/app/https/_index.md page.

The remote repo is referenced by the remote attribute in the front matter.

Local setup

Install Required command line tools

You need Hugo and npm installed. Check that you have the correct hugo version (you need at least 0.45.1 which is used on our CI/CD)

hugo version

# Hugo Static Site Generator v0.45.1/extended darwin/amd64 BuildDate: unknown

Setup development environment

# create development directory
#
mkdir gardener-site
cd gardener-site

# clone required repos
#
git clone https://github.com/gardener/documentation.git
git clone https://github.com/gardener/website-generator.git

cd website-generator

# make a symbolic link of the pure "markdown" files into the hugo directory structure
#
ln -s ../documentation/website/documentation/ ./hugo/content

# install NPM package. required for the "fetch" job of external content
#
npm install

# crawl remote markdown content 
#
node ./node/index.js 


# serve the documentation with hugo
#
cd hugo
hugo serve

# Open the displayed URL and enjoy the documentation :-)
# write some pages and HUGO serve them with live update of your browser
# 



# ctrl+c to end the hugo server and cleanup the crawled remote pages before you "git add" something
#
cd ..
node ./node/index.js clean

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.