Jekyll
Using Jekyll (static site generator) and GitHub Pages (hosting that runs Jekyll), you can create a free static site for your blog or personal site. Size limit is 1 GB.
To create a site you need to register on GitHub:
To create a site you need to install:
Git - https://git-scm.com/download/win
Jekyll - https://jekyllrb.com/docs/installation/windows/
Creating a site
Instead of username use your GitHub username.
Go to the command line:
Win+R cmd
git init username.github.io
cd username.github.io
git checkout --orphan main
jekyll new --skip-bundle .
bundle install
git add .
git commit -m "first commit"
git remote add origin https://github.com/username/username.github.io.git
git push -u origin main
Your site will be located at https://username.github.io/
Information on the site
In the _config.yml file fill title, author, email, url, description (you can delete it). In the about.markdown file, write a description of the site.
Creating a page
Create a .md file in the site folder. For example, page.md . Then a page will appear on your site at https://username.github.io/page. You can put the file in the folder named folder. Then a page will appear on your site at https://username.github.io/folder/page.
Creating a post
https://jekyllrb.com/docs/posts/
Formatting
1) Bold text - **bold text**
2) Italics - *italics*
3) Title (in the beginning of the text):
---
comments: true
title: Title
---
4) Heading - # heading text
5) Subheading - #### subheading text
6) New paragraph - empty line
7) Highlight a link - <link>
8) Link - [text](link)
9) Link to site page - [text](/folder/page)
10) Link back and forth:
text<a href="#note" id="note-back">†</a>
<a href="#note-back" id="note">†</a> text of the note
11) Link to place in text:
[Place](#place)
<a id="place"></a>
12) Table of Contents:
#### Table of Contents
[Introduction](#introduction)
<a id="introduction"></a>
#### Introduction
13) Line break - <br>
14) Blank line (double line break) - <br><br>
15) Footnote:
text[^1] text[^2]
[^1]: footnote text
footnote text
[^2]: footnote text
16) Quote:
> quote
>
> the rest of quote
17) Small text - <sub>text</sub>
https://www.markdownguide.org/basic-syntax/
Adding picture
Let’s say you put an image.png picture in the folder named images.
Place an image on the page:
![Picture description](/images/image.png)
In the center:
{:refdef: style="text-align: center;"}
![Picture description](/images/image.png)
{: refdef}
With a link:
{:refdef: style="text-align: center;"}
[![Picture description](/images/image.png)](link)
{: refdef}
Adding audio
https://stackoverflow.com/questions/63701944/how-to-embed-audio-into-a-jekyll-blog
Adding video
https://github.com/nathancy/jekyll-embed-video
Adding a site icon
https://medium.com/@xiang_zhou/how-to-add-a-favicon-to-your-jekyll-site-2ac2179cc2ed
Updating the site
Win+R cmd
cd username.github.io
git add .
git commit -m "new commit"
git push
You can create .bat file and put these commands into it. Then the commit can be done with two clicks. To prevent the command line from closing immediately after executing commands, add pause command.
Starting the site locally
To counter an error, you need to add webrick to Gemfile:
cd username.github.io
bundle add webrick
Starting the site:
cd username.github.io
bundle exec jekyll serve
Open given address.
Navigation area filtration (upper right corner)
Paste in _config.yml:
header_pages:
-about.markdown
Changing title size
Go to minima folder. On Windows it is located somewhere here:
C:\Ruby32-x64\lib\ruby\gems\3.2.0\gems\minima-2.5.1
Go to _layouts folder. Copy (Ctrl+C) page.html.
Create _layouts folder in username.github.io. Paste (Ctrl+V). Edit page.html with Notepad++. Remove
class="post-title"
Comments
https://help.disqus.com/en/articles/1935528-jekyll-installation-instructions