A mirror of my website's source code.

By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

Rewrite readme

steve0greatness,
created on Wednesday, 17 July 2024, 19:13:44 (1721243624), received on Wednesday, 17 July 2024, 19:14:01 (1721243641)
Author identity: Steve0Greatness <steve0greatnessiscool@gmail.com>

91f010f03574ebb46cebac9ea990f7ce708d9682

README.md

@@ -1,20 +0,0 @@

                                
                                
                                
                            
                                
                                    
                                        
                                        # Steve0Greatness' Website
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        Note that whilst this repository is the official code of my website, the only offically support
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        depolyment of this code is [steve0greatness.nekoweb.org](https://steve0greatness.nekoweb.org).
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        This is the static site generator of my website! It's written completely in
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        Python, using the libraries Jinja2(templating), Markdown2(blog posts), and PyYAML(lists).
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        It's built to be runnable with a single command, and can be ran on multiple operating systems
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        and then dump its contents into the `build` directory(this can be configured); and from there,
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        you can pretty much do whatever you want with it:
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        * Deploy it to GitHub pages
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        * Zip it up using and upload it to Nekoweb.org
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        I mostly use this SSG so I don't have to over-complicate my pages with tons of JavaScript that
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        slows down the load time significantly.
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        It's licensed under GPL-v3, so don't go close-sourcing it :P
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

README.txt

@@ -0,0 +1,118 @@

                                
                                
                                
                            
                                
                                    
                                        
                                        == Website Source Code ==
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        All of my site is generated using a small Python script.
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        This script is build.py. Keep in mind that you may need
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        to install requirements (and also download Renderers.py
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        from this repo):
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        * Jinja2
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        * Markdown2
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        * PyYAML
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        This is all that is required. This script is licensed
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        under the LGPL, as I don't currently want to license my
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        site.
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        If you plan to base your website on my own, I ask that
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        you simply copy the script, and not my entire site (IE:
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        Please only download build.py and Renderers.py). From
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        there, you will need to create a few folders:
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        * views
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        * blog-posts
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        * lists
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        * static
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        The following few sections will explain these
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        directories.
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        ---
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        views includes all of your HTML templates which will be
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        used to render all pages on your site. It uses Jinja
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        syntax. You can find a reference for Jinja's syntax on
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        the project's website:
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        https://jinja.palletsprojects.com/en/3.1.x/templates/
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        ---
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        blog-posts contains all the markdown source files for
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        your blog-posts. These are written using a somewhat
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        unique format:
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        ```
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        title: <Title of the article>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        date: <Initial publication date>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        updated: <Last modification date (optional)>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        <Article body>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        ```
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        Also, I've enabled a bunch of extensions in MD2. Some
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        that matter include:
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        * header-ids
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        * markdown-in-html
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        * footnotes
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        * strike
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        You can read MD2's Wiki* for more information on these:
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        github.com/trentm/python-markdown2/wiki/Extras
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        ---
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        lists includes all lists you may want to make. Lists
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        are a YAML based format.
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        To begin with, there's the root list, which includes
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        its title and a starting paragragh, before denoting the
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        rest of the list using the list keyword.
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        ```
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        title: <Title of list>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        paragraph: <Starting paragraph>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        list:
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        ```
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        The list must be formated as a YAML list. Each element
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        in this list starts with a type. One such type is text.
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        Text is a small section of HTML. It requires there be a
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        text parameter.
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        ```
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        - type: text
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          text: <text>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          comment: <additional text>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        ```
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        text may also have a comment, which is formated as
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        being in parenthesis. Here's a list of other available
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        types:
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        * ```
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          - type: link
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            text: <link text>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            href: <link link>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            comment: <additional text>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          ```
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        * ```
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          - type: category
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            title: <category title>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            id: <id used for the category's header>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            list:
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                              <sub elements>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          ```
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          Note that category can also have other categories.
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        ---
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        static is all static content, it's dumped into the base
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        directory of the output directory.
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        ---
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        Speaking of the output directory: by default, it's at
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        build. build can be deployed to whatever hosting
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        service you are using, such as GitHub Pages.