This is a custom project derived from Nighthawk Pages. It is a personal adaptation and is intended to contain summary of my summary of classroom tech talks and my personal coding work.
This project is customized to support my computer science learnings of using Javascript, Python, and Java.
As a student in Del Norte CompSci I am required to revise my personal GitHub Pages at each midterm and final. My GitHub pages does and will contain a compilation of personal work performed within each grading period (Sprint)
In general, this blog does and will contain lessons, hacks, coding work (JavaScript, Python, and Java). The project also serves function of presenting games and the frontend of full-stack applications.
Exchanging information between others using similar Nighthawk Pages projects...
This project is created from Nighthawk Coders
The project was initially based on Fastpages. But this project has diverged from those roots into an independent entity. The decision to separate from Fastpages was influenced by the deprecation of Fastpages by authors. It is believed by our community that the authors of fastpages turned toward Quatro. After that change of direction fastpages did not align with the Teacher's goals and student needs. The Nighthawk Pages project has more of a raw development blogging need.
The Apache license has its roots in Fastpages. Thus, it carries Appache license forward. However, most of the code is likely unrecognizable from those roots.
Notable Contributions: See Nighthawk Pages README
Blog Contributions: Often students contribute articles and blogs to this project. Their names are typically listed in the front matter of their contributing post.
The absolutes in setup up...
Activate GitHub Pages Actions: This step involves enabling GitHub Pages Actions for your project. By doing so, your project will be automatically deployed using GitHub Pages Actions, ensuring that your project is always up to date with the latest changes you push to your repository.
Update _config.yml
: You need to modify the _config.yml
file to reflect your repository's name. This configuration is crucial because it ensures that your project's styling is correctly applied, making your deployed site look as intended rather than unstyled or broken.
github_repo: "student_2025"
baseurl: "/student_2025"
Set Repository Name in Makefile: Adjust the REPO_NAME
variable in your Makefile to match your GitHub repository's name. This action facilitates the automatic updating of posts and notebooks on your local development server, improving the development process. Changing your port number can really help avoid confusion when trying to run multiple projects on your personal machine.
# Configuration, override port with usage: make PORT=4200
PORT ?= 4100
REPO_NAME ?= student_2025
LOG_FILE = /tmp/jekyll$(PORT).log
All GitHub Pages
websites are managed on GitHub infrastructure and use GitHub version control. Each time we change files in GitHub it initiates a GitHub Action, a continuous integration and development toolset, that rebuilds and publishes the site with Jekyll.
Jekyll
to transform your markdown and HTML content into static websites and blogs. Jekyll.Comprehensive start. A topic-by-topic guide to getting this project running is published here.
Quick start. A quick start below is a reminder, but is dependent on your knowledge. Only follow this instruction if you need a refresher. Always default to the comprehensive start if any problem occurs.
Run these commands to obtain the project, then locate into the project directory with the terminal, install an extensive set of tools, and make.
git clone <this-repo> # git clone https://github.com/nighthawkcoders/john_2025.git
./scripts/activate_ubuntu.sh
./scripts/activate_macos.sh
./scripts/activate.sh
To preview the project you will need to "make" the project.
The very first time you clone run project you will need to run this command as the final part of your setup, creating virtual environment and setting up custom packages.
./scripts/venv.sh
As running sever has Python dependencies it is required to run the project out of a virtual environment.
This requires running terminal commands make
, make stop
, make clean
, or make convert
to manage the running server. Logging of details will appear in the terminal. A Makefile
has been created in the project to support commands and start processes.
Start the server, this is the best command choice for initial and iterative development. Note. after the initial make
, you should see files automatically refresh in the terminal as they are saved VSCode save.
source venv/bin/activate
make
Start the preview server in the terminal,
The terminal output from make
shows the server address. "Cmd" or "Ctl" click the http location to open the preview server in a browser. Here is an example Server address message, click on the Server address to load:...
http://0.0.0.0:4100/john_2025/
Save on ".ipynb" or ".md" file activiates "regeneration". An example terminal message is below. Refresh the browser to see updates after the message displays.
Regenerating: 1 file(s) changed at 2023-07-31 06:54:32
_notebooks/2024-01-04-cockpit-setup.ipynb
Terminal messages are generated from background processes. At any time, click return or enter in a terminal window to obtain a prompt. Once you have the prompt you can use the terminal as needed for other tasks. Always return to the root of project cd ~/vscode/student_2025
for all "make" actions.
Stopping the server ends the web server applications running process. However, it leaves constructed files in the project in a ready state for the next time you run make
.
make stop
This command will top the server and "clean" all previously constructed files (ie .ipynb -> .md). This is the best choice when renaming files has created duplicates that are visible when previewing work.
make clean
Test Jupyter Notebook conversions (ie .ipynb -> .md), this is the best choice to see if an IPYNB conversion error is occurring.
make convert
There are two primary directories for creating blogs. The "_posts" directory is for authoring in markdown only. The "_notebooks" allows for markdown, pythons, javascript and more.
To name a file, use the following structure (If dates are in the future, review your config.yml setting if you want them to be viewed). Review these naming conventions.
For markdown files in _posts:
For Jupyter notebooks in _notebooks:
Tags are used to organize pages by their tag the way to add tags is to add the following to your front matter such as the example seen here categories: [Tools]
Each item in the same category will be lumped together to be seen easily on the search page.
All pages can be searched for using the built-in search bar. This search bar will search for any word in the title of a page or in the page itself. This allows for easily finding pages and information that you are looking for. However, sometimes this may not be desirable so to hide a page from the search you need to add search_exclude: true
to the front matter of the page. This will hide the page from appearing when the viewer uses search.
To add pages to the top navigation bar use _config.yml to order and determine which menus you want and how to order them. Review the_config.yml in this project for an example.
There is a blog page that has options for images and a description of the page. This page can help the viewer understand what the page is about and what they can expect to find on the page. The way to add images to a page is to have the following front matter image: /images/file.jpg
and then the name of the image that you want to use. The image must be in the images
folder. Furthermore, if you would like the file to not show up on the blog page hide: true
can be added to the front matter.
NIGHTHAWK Pages support a variety of different themes that are each overlaid on top of minima. To use each theme, go to the "_sass/minima/custom-styles.scss" file and simply comment or uncomment the theme you want to use.
To learn about the minima themes search for "GitHub Pages minima" and review the README.
To find a new theme search for "Github Pages Themes".
{%- include post_list.html -%}
Note that the liquid syntax is surrounded by curly braces and percent signs. This can be used anywhere in the repository.layout: [your layout here]
. All layouts will be written in liquid to define the structure of the page.Metadata, also known as "front matter", is a set of key-value pairs that can provide additional information to GitHub Pages about .md and .ipynb files. This can and probably will be used in other file types (ie doc, pdf) if we add them to the system.
In the front matter, you can also define things like a title and description for the page. Additional front matter is defined to place content on the "Computer Science Lab Notebook" page. The courses:
key will place data on a specific page with the nested week:
placing data on a specific row on the page. The type:
key in "front matter" will place the blog under the plans, hacks(ToDo), and tangibles columns.
In our files, the front matter is defined at the top of the page or the first markdown cell.
First, open one of the .md or .ipynb files already included in either your _posts|_notebooks folder.
In the .md file, you should notice something similar to this at the top of the page. To see this in your .ipynb files you will need to double-click the markdown cell at the top of the file.
---
toc: true
comments: true
layout: post
title: Jupyter Python Sample
description: Example Blog!!! This shows code and notes from hacks.
---
The front matter will always have '---' at the top and bottom to distinguish it and each key-value pair will be separated by a ':'.
Here we can modify things like the title and description.