Default
A GitHub Page with no Jekyll Theme
C. BinKadal --- Sendirian, Berhad

Table of Content


This page is about building a GitHub Page with no Jekyll theme. It is assumed that you know and have a GitHub account, and know how to setup a GitHub Page.


GitHub Page Configuration Files


Makefile

# REV24: Wed 20 Dec 2023 15:00
# REV19: Tue 21 Feb 2023 20:00
# REV09: Fri 27 Jan 2023 10:00
# REV03: Thu 14 Jul 2022 07:00
# REV01: Sat 29 Jan 2022 13:00
# START: Mon 15 Feb 2021 09:00

SITEURL   = "doit.vlsm.org"
SRC_FILES = $(wildcard *.pmd)
MD_FILES  = $(patsubst %.pmd, %.md, $(SRC_FILES))

all: $(MD_FILES) .siteHack

%.md: %.pmd
	python assets/scripts/includeScript.py < $< > $@

004.md: 004.pmd _config.yml Gemfile _layouts/default.html Makefile \
        _includes/navbar.html \
        _includes/footer.html _includes/head.html _includes/google-analytics.html \
        assets/css/style.css assets/scripts/includeScript.py
	python assets/scripts/includeScript.py < 004.pmd > 004.md

005.md: 005.pmd assets/scripts/sources.list assets/scripts/clean-system.sh \
        assets/scripts/026-debJEKYLL 
	python assets/scripts/includeScript.py < 005.pmd > 005.md

006.md: 006.pmd assets/scripts/clean-home.sh \
        assets/scripts/set-rbenv1.sh
	python assets/scripts/includeScript.py < 006.pmd > 006.md

008.md: 008.pmd assets/configs/config-linux-kernel-amd64.txt
	python assets/scripts/includeScript.py < 008.pmd > 008.md

010.md: 010.pmd assets/configs/config-linux-kernel-arm64.txt
	python assets/scripts/includeScript.py < 010.pmd > 010.md

011.md: 011.pmd assets/configs/config-linux-kernel-arm64.txt
	python assets/scripts/includeScript.py < 011.pmd > 011.md

026.md: 026.pmd assets/scripts/026-debBasic \
        assets/scripts/026-debCompile assets/scripts/026-debOSP assets/scripts/026-debOSPADD \
        assets/scripts/026-debJEKYLL 
	python assets/scripts/includeScript.py < 026.pmd > 026.md

027.md: 027.pmd assets/scripts/027-doBASH assets/scripts/027-doDNS assets/scripts/027-doZero \
        assets/scripts/027-doUPDATE assets/scripts/027-doZero
	python assets/scripts/includeScript.py < 027.pmd > 027.md

.siteHack: _site/sitemap.xml
	@bash  .siteHack $(SITEURL)
	@touch .siteHack

.phony: ALL


_config.yml

version:          "Mon 18 Nov 2024 17:00"
copyright:        "2021-2024"
title:            "This Is How Me Do It!"
author:           "C. BinKadal"
address:          "Sendirian, Berhad"
description:
  This Is How Me Do It!
  This Is How Me Do It!
disclaimer:
  I have spoken.
keywords:         "jekyll, testing"
navbarlinks:
- navbar:         "Home"
  link:           "/"
- navbar:         "GitHub"
  link:           "https://github.com/yforku/doit/"
- navbar:         "Listing"
  link:           "/004.html"
- navbar:         "About"
  link:           "/ABOUT/"
- navbar:         "GitHub Page"
  link:           "https://doit.vlsm.org/"
lang:             "en-US"
sitemap:          "true"
markdown:         "kramdown"
defaults:
- scope:
    path:         ""
  values:
    layout:       "default"
github:
- metadata
plugins:
- jekyll-sitemap
- jekyll-seo-tag
google_analytics: "G-FTZLNT0SCC"
urlweb:           "https://doit.vlsm.org/"
urlcontact:       "TBA"
urlgithub:        "https://github.com/yforku/doit/"


Gemfile

source "https://rubygems.org"

group :jekyll_plugins do
gem "addressable"
gem "faraday-retry"
gem "ffi"
gem "github-pages"
gem "jekyll"
gem "jekyll-sitemap"
gem "jekyll-seo-tag"
gem "jekyll-feed"
gem "jekyll-paginate"
gem "minitest"
gem "nokogiri"
gem "readline-ext"
gem "tzinfo-data"
gem "webrick"
end


_layouts/default.html


<!DOCTYPE html>
<html lang="en">
<!-- File _layouts/layout.html           -->
<!-- (c) 2021 - 2021 VauLSMorg           -->
<!-- REV00: Sun 04 Jul 2021 10:48:43 WIB -->
<!-- START: Wed 17 Feb 2021 19:44:53 WIB -->
<!-- This is a free HTML file            -->
{% include head.html %}
<body class="plainclass1">
<!-- body class="backclass" -->
<div class="container">
  <header>
  <div class="row">
    <div class="column left">
      <img src="{{ site.baseurl }}/assets/images/default.jpg" alt="Default" style="width:130px; border-radius:50%">
    </div>
    <div class="column right1">
      {% if page.title %}{{ page.title | escape }}
      {% else %}{{ site.title | escape }}{% endif %}
    </div>
    <div class="column right2">
      {% if page.author %}{{ page.author | escape }}
      {% else %}{{ site.author | escape }}{% endif %}
      ---
      {% if page.address %}{{ page.address | escape }}
      {% else %}{{ site.address | escape }}{% endif %}
    </div>
  </div>
  </header>
  {% include navbar.html %}
  <div class="textleft">
  <section>
     {{ content }}
  </section>
  </div>
  {% include footer.html %}
  {% include google-analytics.html %}
  {% include scripts.html %}
</div>
</body>
</html>


_includes/head.html


<!-- File _includes/head.html             -->       
<!-- (c) 2021 - 2021 VauLSMorg            -->
<!-- REV01: Thu 02 Jun 2022 06:00         -->
<!-- START: Wed 17 Feb 2021 19:48         -->
<!-- This is a free HTML file             -->
<head>
  <title>
    {% if page.title %}{{ page.title | escape }} - {{ site.title | escape }}
    {% else %}{{ site.title | escape }}{% endif %}
  </title>
  <meta charset="utf-8">
  <meta name="viewport"    content="width=device-width, initial-scale=1">
  <meta name="description" content="{{ page.excerpt | default: site.description }}">
  <!-- link href="{{ site.baseurl }}/assets/css/css.css" rel="stylesheet" type="text/css" title="Style" -->
  <!-- link href="/assets/css/css.css" rel="stylesheet" type="text/css" title="Style" -->
  <link href="{{ site.baseurl }}/assets/css/style.css" rel="stylesheet" type="text/css" title="Style">
  {% seo %}
</head>



_includes/navbar.html


<!--
File   _includes/navbar.html
REV03: Tue 23 Jul 2024 13:00
REV02: Tue 03 Aug 2021 09:00
REV01: Sun 04 Jul 2021 09:00
START: Wed 17 Feb 2021 19:00
This is a free HTML file
-->

<nav class='navbar'>
  <ul>
    {% for ii in site.navbarlinks %}    
      <li><a href="{{ ii.link | relative_url }}" target='_blank'>{{ ii.navbar }}</a>
    {% endfor %}
  </ul>
</nav>


assets/css/style.css

/*
 Shamelessly stolen from "Here, There, and Everywhere",
 including but not limited to "bootstrap", "stack overflow", 
 "Mike Dane", "w3schools", et al.
 */

.backclass {
  background-image:url(/assets/images/default.png)
}

.plainclass {
  color:            white;
  background-color: #101030;
}

/* See https://www.w3schools.com/colors/colors_hsl.asp              */
/* See https://www.quackit.com/css/color/charts/hsl_color_chart.cfm */
.plainclass1 {
  color:            hsl(0, 100%, 100%);
  background-color: hsl(0, 10%, 10%);
  line-height:      120%;
  font-family:      monospace,courier;
}

.plainclass1 li {
  line-height:      140%;
}

.plainclass1 h1 {
  color:            hsl(100, 50%, 50%);
  font-size:        1.9em;
  font-weight:      bold;
}

.plainclass1 h2 {
  color:            hsl(100, 50%, 50%);
  font-size:        1.4em;
  font-weight:      bold;
}

.plainclass1 h3 {
  color:            hsl(100, 50%, 50%);
}

.plainclass1 h4 {
  color:            hsl(100, 50%, 50%);
}

.container {
  max-width:    70%;
  margin:       0 auto;
  font-size:    1em;
  text-align:   justify;
}

.container a {
  color: #a0a0a0;
}

.container a:hover {
  color: #f0f0f0;
}

.textleft {
  text-align:   left;
}

.row {
}

.column {
  float:            left;
  display:          inline-block;
  background:       #808080;
  height:           130px;
  width:            100%;
  padding-top:      10px;
  padding-bottom:   10px;
  padding-left:     10px;
  padding-right:    10px;
  text-align:       left;
}

.left {
  width:            130px;
}

.right1 {
  height:           66px;
  width:            calc(100% - 200px);
  padding-top:      24px;
  padding-bottom:   0px;
  padding-left:     30px;
  font-size:        1.4em;
  font-weight:      bold;
}

.right2 {
  height:           50px;
  width:            calc(100% - 200px);
  padding-top:      5px;
  padding-bottom:   5px;
  padding-left:     30px;
  font-size:        1.2em;
  font-weight:      bold;
}

.youtube {
  float:            left;
  display:          inline-block;
  height:           150px;
  width:            100%;
  padding-top:      10px;
  padding-bottom:   10px;
  padding-left:     10px;
  padding-right:    10px;
}

.yvideo {
  width:            25%;
  height:           100%;
  padding-top:      0px;
  padding-bottom:   0px;
  padding-left:     0px;
  padding-right:    0px;
}

.yinfo {
  width:            calc(75%  - 30px);
  height:           calc(100% - 20px);
  padding-top:      10px;
  padding-bottom:   10px;
  padding-left:     10px;
  padding-right:    10px;
}

.row:after {
  content: "";
  display: table;
  clear: both;
}

td {
  padding-top:      3px;
  padding-bottom:   3px;
}

li {
  padding-top:      3px;
  padding-bottom:   3px;
}

.navbar {
  font-size:        0.8em;
  border-width:     0px;
  margin:           0px;
}

.navbar ul li {
  display:          inline-block;
  background-color: hsla(0,     0%,    0%, 1);
  padding:          11px;
}

.navbar ul li a {
  text-decoration:  none;
}

.navbar ul li a:hover {
  background-color: hsla(255,   100%,   50%, 1);
  font-size:        1.15em;
  font-weight:      bold;
  padding:          2px;
}

pre {
  background-color: hsla(0,     0%,    0%, 1);
  border:           1px solid hsla(0,    50%,   20%, 1);
  padding:          10px;
  font-size:        16px;
  color:            hsla(0,   100%,  100%, 1);
  border-radius:    2px;
  word-wrap:        normal;
  overflow:         auto;
  overflow-y:       hidden;
}

table {
  width: 100%;
  margin: 0 0 20px 0;
}

th {
  text-align: left;
  border-bottom: 1px dashed #b5e853;
  padding: 5px 10px;
}

td {
  padding: 5px 10px;
}

/*
  ZCZC
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px; 
  color: #b5e853;
  background: rgba(0, 0, 0, 0.9);
  border-radius: 2px;
  word-wrap: normal;
  overflow: auto;
  overflow-y: hidden;
  max-width: 65%;

 */

/*
 ************************************************************
 */

@media screen and (max-width:768px) {
  ul {
    margin: 0;
    padding: 0;
  }
  #navbar ul li {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    text-align: center;
  }
  #navbar ul li a {
    margin: 0;
    padding: 0;
  }
  #menu {
    display: none;
  }
  #maincontent {
    width: 100%;
    padding: 0;
  }
  h1 {
    font-size: 1em;
  }
}

/*
 ************************************************************
 */



_includes/google-analytics.html


<!--
File:  _includes/google-analytics.html

REV02: Tue 03 Aug 2021 09:34:59 WIB
REV01: Wed 31 Mar 2021 07:15:14 WIB
START: Wed 17 Feb 2021 19:47:55 WIB

Google Analytics: Global site tag (gtag.js) 
-->

{% if site.google_analytics %}
  <script
    async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}">
  </script>
  <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());
    gtag('config', '{{ site.google_analytics }}');
  </script>
{% endif %}



assets/scripts/includeScript.py

# (c) 2011 Brice Fernandes. This script was ripped from 
# https://fractallambda.com/2011/08/17/pincpy-including-files-and-script-output.html
# Note: This script is outdated.  
# The author uses Handlebars.js or Pystache for the same purpose.
# Usage: 
#     python .program/xx.py < in.pmd > out.md

import sys
import re
import shlex
import subprocess as sp
 
exe_pat = re.compile(r'(\s*)\(!>(.*)<\)\s*')
inc_pat = re.compile(r'(\s*)\(>(.*)<\)\s*')
 
if __name__ == "__main__":
  for line in sys.stdin:
    match_exe = re.match(exe_pat, line)
    match_inc = re.match(inc_pat, line)

    if match_exe:
      space = match_exe.group(1)
      exe = match_exe.group(2).strip()
      args = shlex.split(exe)
      sys.stdout.writelines(
        map(
          lambda x: space+x+"\n", 
          sp.check_output(args).split("\n")))

    elif match_inc:
      space = match_inc.group(1)
      inc = match_inc.group(2).strip()
      sys.stdout.writelines(
        map(
          lambda x: space+x, 
          open(inc)))

    else:
      sys.stdout.write(line)


Table of Content

NEXT: Using your own domain name (eg. doit.vlsm.org)


© 2021-2024 --- C. BinKadal --- About --- Revision: Mon 18 Nov 2024 17:00.