Coder Social home page Coder Social logo

github-docs-examples's Introduction

Writing Good Documentation

Step 1 - Using Codeblocks.

Codeblocks in markdown make it very easy for tech people to copy, paste, share code. A good Cloud Enginner uses Codeblocks whenever possible

Because it allows others to copy and paste their code to replicate or research issues

  • In order to create codeblocks in markdown you need to use three blackticks (```)
  • Not to be confused with quotation (''')
#!/bin/bash
read -p "Enter a number and hit \"Enter\" " user_number
if [ $user_number -gt 10 ]
then
    echo "The number you entered is greater than 10."
else
    echo "The number you entered is less than or equal to 10."
fi
  • When you can you should attempt to apply syntax highlighting to your codeblocks
#!/bin/bash
read -p "Enter a number and hit \"Enter\" " user_number
if [ $user_number -gt 10 ]
then
    echo "The number you entered is greater than 10."
else
    echo "The number you entered is less than or equal to 10."
fi

20210209-ITQ_background-03B

Good Cloud Engineers use codeblocks for both Code and Errors that appear in the console.

Traceback (most recent call last):
        2: from /usr/bin/irb:23:in `<main>'
        1: from (irb):1
RuntimeError: This is a custom error message

Here is an example of using a codeblocks for an error thaht appears in bash.

When you can always provide a codeblock instead of a screnshot. If you need to take a screenshot make sure it is not a photo from your phone.

There are certain cases where its okay to take photos with your phone. This is when you are showing something like a keyboard, which does not appear on a computer screen. If it render on your computer screen it should be a screenshot

Step 3 - Use GiHub Flavored Markdown Task Lists

Github extends Markdown to have a list where you can check off items. [1]

  • Finish step 1
  • Finish step 2
  • Finish Step 3

Step 4 - Use Emojis (Optional)

GitHub Flavored Markdown (GFM) supports emoji shortcodes

Here are some examples:

Name Shortcode emoji
Cloud `:cloud:' ☁️

Step 5 - How to create a table

You can use the following markdown format to create tables.

| Name | Shortcode | emoji|
| --- | --- | ---|
| Cloud | `:cloud:' | ☁️ |
| Cloud with lighting | ':Cloud_with_lighting:` | 🌩️ |

GitHub extends the functionality of Markdown tables to provide more alignment and table cell formatting options. [2]

Secret Window Hidden Garden Photo

External References

  • GitHub Flavored Markdown Spec
  • Basic writing and formatting syntax (Github Flavored Markdown)
  • GFM - Tasks Lists [1]
  • GFM - Emoji Cheatsheet
  • GFM - Tables( with extensions [2]

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.