Skip to content

Beginner's Guide to CRIPTScript maintenance

nh916 edited this page Apr 14, 2023 · 1 revision

Documentation

Required Installation

The following is a quick list of software that needs to be installed on your computer. There will be more details in further sections.

  1. install git
  2. install GitHub desktop client
    • This is a simple git client with a user interface that makes working with GitHub and Git easier

  3. install ruby programming language
  4. Please install vscode text editor

Clone the CRIPT Scripts Repository

Using the GitHub client please clone the CRIPT Scripts repository

GitHub client tutorial on how to clone a repository onto local computer


Jekyll

CRIPT Scripts uses a popular ruby package called Jekyll

  1. open a terminal in the directory where you have CRIPT Scripts repository

CRIPT Scripts terminal

Resources


How to Install Required Ruby Gems

  1. To install needed Ruby packages called gems, within the terminal please run
gem install Jekyll bundler

this is to installs both Jekyll and Bundler

Note: CRIPT Scripts uses just the docs Jekyll theme

How to Start Jekyll Server

  1. to run the Jekyll website locally please run the following command within the terminal
bundle exec jekyll serve
  1. if you open your browser and paste in http://127.0.0.1:4000/ in the URL bar at the top, you should see CRIPT Scripts loaded locally on your computer
    • The URL will also be shown within the terminal as well

This is great way to preview your changes on your computer before uploading it to the website

How to Stop Jekyll Server

To Stop the Jekyll Local Server: Windows: ctrl + c Apple & Linux: cmd + c


Updating CRIPT Scripts

Basics

The language that CRIPT Scripts files are written is Markdow although HTML can be added to where necessary

within the root directory there is an index.md this is the file that will be displayed upon landing on CRIPT Scripts website

Layout

---
layout: default
title: Scripts
has_children: true
---

the above is written in YAML that sets the settings for that page. More on YAML.

  • layout The above code says that the layout of each page will be default

    Note: I have never needed to change the layout and keeping it as default works fine

  • title The title section is the title that will appear on the browser tab and on the side in the Table of Contents

CRIPT Scripts title section chrome

  • has_children This says whether there will be pages under this tab or if this is a single page

Note: It takes some time for the server to update locally and the changes to be reflected

Adding CRIPT Sections

More documentation to come📄

Adding CRIPT Pages to Sections

More documentation to come📄

Responding with Files vs GitHub link

It is more preferable to respond with a link when possible. This is because most users would rather just download and look at the files they need instead of going to a GitHub repository, navigating it, and getting to the correct file

More documentation to come📄


How to Publish Your Changes

After you are satisfied with your changes you can push to a new branch.

Merging your branch to Master branch or pushing to it directly will trigger a GitHub workflow that will build the CRIPT Scripts website and deploy it to CRIPT Scripts