« Back to home

Code Example

Posted on


Rendering Code

Let’s see how Hugo and Markdown do with displaying some code text…


This is an example snippet of Python code.

import this
from thisFile import functionA

Class HugoClass():

Class SubHugoClass(HugoClass):
    """A docstring here explaining what this class does."""

    def __init__(self, name, age):
        """Initialize name age and age attributes."""
        # Make accessible attributes or variables:
        self.name = name
        self.age = age

    # Some method
    def method_a(self):
        # do something here,
        # and here

    # More methods can follow here

# Make an instance representing a specific SubHugoClass  

# Calling methods  

# Make multiple instances  


$ mkdir new-dir
$ cd new-dir
$ wget https://somethingheretowget.git