Git Product home page Git Product logo

doc-example's Introduction

Writing good documentation

1. Using codeblocks

It important to write codeblocks in order to see the code we are working on, copy or review our code. Get in the habit of using codeblocks on your documentation. 1

This is a Python example:

import requests
from bs4 import BeautifulSoup

# URL of the website to scrape
url = "https://example-news-website.com"

# Send an HTTP GET request to the website
response = requests.get(url)

# Check if the request was successful (status code 200)
if response.status_code == 200:
    # Parse the HTML content of the page using BeautifulSoup
    soup = BeautifulSoup(response.text, 'html.parser')
    
    # Find and extract the titles of articles
    article_titles = soup.find_all('h2', class_='article-title')
    
    # Print the extracted article titles
    for title in article_titles:
        print(title.text)
else:
    print("Failed to retrieve the web page.")

Also, you can use codeblocks for displaying console errors

This is en python console error

Traceback (most recent call last):
  File "example.py", line 2, in <module>
    print(variable_that_does_not_exist)
NameError: name 'variable_that_does_not_exist' is not defined

2. Include images for ilustration

It's always a good idea to include som images for ilustration so we can understand more about what we are writing

image-example

3. Github Tasks List

We can use Task list in order to track what tasks we have finish by putting a checkmark.

  • Step One
  • Step Two
  • Step three
  • Step four
  • Final step

4. Use emojis whenever you can (optional)

Github GFM supports emojis by using some shortcodes.

Here are some examples:

Name Shortcode Emoji
Blush :blush: ๐Ÿ˜Š
Laughing :laughing: ๐Ÿ˜†
Sunglasses :sunglasses: ๐Ÿ˜Ž

References for Markdown Language

Footnotes

  1. Remember to do proper formatting โ†ฉ

doc-example's People

Contributors

ymendozahn avatar

Watchers

 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.