Skip to content

Commit 42a57a2

Browse files
committed
move to mdbook format
1 parent dd7cceb commit 42a57a2

28 files changed

+313
-266
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,4 @@ crystal/examples/kemal/bin/
112112
/rust/examples/other/multi_counter_with_manual_csv/counter.csv
113113
/rust/examples/other/send-mail-with-sendgrid/config.txt
114114
/rust/examples/sqlite/counter/counter.db
115+
/*/book/

Diff for: github-pages/book.toml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[book]
2+
authors = ["Gabor Szabo"]
3+
language = "en"
4+
multilingual = false
5+
src = "src"
6+
title = "GitHub pages"

Diff for: github-pages/github-pages.md

-266
Original file line numberDiff line numberDiff line change
@@ -1,269 +1,3 @@
11
# GitHub Pages
22
{id: github-pages}
33

4-
## Why use version control?
5-
{id: why-use-version-control}
6-
7-
* Everyone uses some version control. (e.g. by copying the document with a date suffix).
8-
* There are many version control systems (VCSs).
9-
* `git` is the de-facto standard these days. It is open source and free. It is integrated in many tools.
10-
* [GitHub](https://github.com/) is the most popular cloud-based hosting service for `git` repositories with many extra features.
11-
12-
* In this session we will use `git` only via the web-site of GitHub.
13-
14-
## GitHub Account
15-
{id: github-account}
16-
17-
* If you don't have an account yet on [GitHub](https://github.com/) then create one now.
18-
* It should be personal. It will remain with you for your life. (or the life of GitHub)
19-
* It should not be related to your current educational institute or workplace or this presentation or course.
20-
21-
* My account is [szabgab on GitHub](https://github.com/szabgab/). It is my nickname almost everywhere on the Internet. It is even the address of [my web site](https://szabgab.com/).
22-
23-
## Repositories
24-
{id: github-repositories}
25-
26-
* On GitHub you can store as many `git` repositories as you like. They can be either private or public.
27-
* The names of the repositories are arbitrary.
28-
* https://github.com/USERNAME/REPO-NAME
29-
* https://github.com/ORGANISATION/REPO-NAME
30-
31-
* Some repository names have special meanings.
32-
* USERNAME
33-
* USERNAME.github.io
34-
35-
For me they are
36-
* [https://github.com/szabgab/szabgab](https://github.com/szabgab/szabgab)
37-
* [https://github.com/szabgab/szabgab.github.io](https://github.com/szabgab/szabgab.github.io)
38-
39-
40-
## GitHub Avatar
41-
{id: github-avatar}
42-
43-
* Update your profile, add information about yourself.
44-
* Add a picture or an avatar of you to make your account more recognizable.
45-
* Your profile / Edit profile / ...
46-
47-
* The big text comes from the `README.md` file of the [szabgab/szabgab](https://github.com/szabgab/szabgab) repository.
48-
49-
## Setting up GitHub page
50-
{id: setting-up-github-page}
51-
52-
* Create a GitHub repository called USERNAME.github.io (using your own USERNAME).
53-
* For user [szabgab](https://github.com/szabgab/) it is [szabgab.github.io](https://github.com/szabgab/szabgab.github.io).
54-
* Make the new repository public so everyone will be able to see the source.
55-
* Check the "Add a README file" checkbox.
56-
57-
* Check the `Actions` tab to see the process generating the web site.
58-
59-
* Visit https://USERNAME.github.io (it may take a few minutes to update)
60-
* For user szabgab it is [szabgab.github.io](https://szabgab.github.io/).
61-
* For GitHub Organizations it is exactly the same process.
62-
63-
## HTML - view source
64-
{id: html-view-source}
65-
66-
* Web sites are built using HTML.
67-
* Look at the source of the page. That's HTML. We don't want to write that.
68-
* So we'll use Markdown and an some tool that will convert Markdown to HTML.
69-
70-
71-
## GitHub page with Jekyll
72-
{id: github-page-with-jekyll}
73-
74-
* [Jekyll](https://jekyllrb.com/) a static site generator
75-
76-
77-
* Many [Static Site Generators](https://jamstack.org/generators/).
78-
79-
80-
## Markdown
81-
{id: markdown-links}
82-
83-
* [Markdown](https://daringfireball.net/projects/markdown/)
84-
* [GitHub flavored Markdown](https://github.github.com/gfm/)
85-
86-
87-
## Markdown
88-
{id: markdown}
89-
90-
* Titles: One or more `#` followed by the the title
91-
* **Bold** `**` on both sides
92-
* _Italic_ `_` on both sides
93-
94-
* Horizontal separator `---`.
95-
96-
* Link to some other site. e.g. to the slides.
97-
98-
* Unordered list. `*`
99-
* Ordered list (both with ordered numbers and with `1.`-s)
100-
101-
* Add image from other site `![](http://www.adelaidezoo.com.au/wp-content/uploads/sites/2/2016/03/Fu-Ni-7.jpg)`
102-
* Upload an image and show it.
103-
104-
* Use the `img` HTML element to set the size of the image.
105-
106-
```
107-
![my ant](little-black-ants.jpg)
108-
```
109-
110-
* Table
111-
112-
* Verbatim with back-ticks.
113-
* Inline with one-tick.
114-
* Multi-line with 3-ticks. Add also programming language for highlighting.
115-
* Indenting 4 spaces also works.
116-
117-
118-
## Add page
119-
{id: add-another-page}
120-
121-
* Create a file called `about.md`.
122-
* Visit https://USERNAME.github.io/about
123-
* Show how to link to it from the main page.
124-
125-
![](examples/about.md)
126-
127-
128-
## Customized 404 Page not found
129-
{id: page-not-found}
130-
131-
* Visit a page that does not exist.
132-
* Create the `404.md` file to provide custom error message.
133-
134-
135-
## Jekyll themes
136-
{id: jekyll-themes}
137-
138-
* [themes](https://pages.github.com/themes/)
139-
* Create `_config.yml` with
140-
141-
```
142-
theme: jekyll-theme-cayman
143-
```
144-
145-
146-
## Themes layout
147-
{id: theme-layout}
148-
149-
* [themes](https://pages.github.com/themes/)
150-
* [Cayman in GitHub](https://github.com/pages-themes/cayman)
151-
* [Cayman demo](https://pages-themes.github.io/cayman/)
152-
* [`_layouts/default.html`](https://github.com/pages-themes/cayman/blob/master/_layouts/default.html) look at the template tags to learn about config options.
153-
154-
155-
## Site-wise configuration
156-
{id: site-wise-configuration}
157-
158-
* In `_config.yml`
159-
160-
In the `_config` file we can add a field called `description:`. It will provide the content for the subtitle of the header.
161-
162-
```
163-
description: Some text
164-
```
165-
166-
167-
![](examples/_config.yml)
168-
169-
170-
171-
## Page-specific configuration - frontmatter
172-
{id: page-specific-configuration}
173-
174-
* At the top of the .md files
175-
* [Frontmatter documentation](https://jekyllrb.com/docs/frontmatter/)
176-
177-
178-
```
179-
---
180-
title: About the szabgab page
181-
---
182-
```
183-
184-
185-
## JavaScript code
186-
{id: javascript-code}
187-
188-
![](examples/js.md)
189-
190-
* One can include plain HTML in the md file. So include `script` tags.
191-
* The code should come at the end to have the DOM available already.
192-
193-
## Load jQuery and add jQuery code
194-
{id: load-jquery-code}
195-
196-
![](examples/jquery.md)
197-
![](examples/demo.js)
198-
199-
When you change the JavaScript file, make sure it is reloaded! Browser cashing can cause you a bad day.
200-
201-
202-
203-
## Add a JSON file, load it with jQuery and display the content
204-
{id: load-json-file}
205-
206-
![](examples/json.md)
207-
![](examples/json.js)
208-
![](examples/data.json)
209-
210-
211-
212-
## HTML pages
213-
{id: html-pages}
214-
215-
216-
* Create a file called `about.html`.
217-
218-
![](examples/about.html)
219-
220-
* Note: the `.html` files take precedence over the `.md` files!
221-
222-
223-
## Examples
224-
{id: examples}
225-
226-
227-
* [rustatic](https://rustatic.code-maven.com/) - [source](https://github.com/szabgab/rustatic/) using Jekyll.
228-
* my simple site [github.szabgab.com](https://github.szabgab.com/) - [source](https://github.com/szabgab/real-szabgab.github.io) using only Markdown files and the default Jekyll processor on GitHub pages.
229-
* [Kantoniko](https://kantoniko.com/) - [source](https://github.com/kantoniko/) - using Python combining data from many repositories. A dictionary and content in Ladino. Written in Python collecting data from multiple repositories.
230-
* my personal site [szabgab.com](https://szabgab.com/) - [source](https://github.com/szabgab/szabgab.com) - using Perl.
231-
* [Perl Weekly](https://perlweekly.com/) - [source](https://github.com/szabgab/perlweekly) - Perl, generate the site locally and push the HTML files as well.
232-
233-
* The students of [WIS Python course started in 2024-04](https://github.com/szabgab/wis-python-course-2024-04)
234-
* The students of [WIS Python course started in 2024-11](https://github.com/szabgab/wis-python-course-2024-11)
235-
236-
237-
* [Planet Perl](https://perl.theplanetarium.org/) - [source](https://github.com/PerlToolsTeam/planetperl) using Perl.
238-
* [Forem Reports](https://forem.code-maven.com/) - [source](https://github.com/szabgab/forem-reports).
239-
* [(Rust) virtual events](https://events.code-maven.com/) - [source](https://github.com/szabgab/virtual-events).
240-
* [Ruby Digger](https://ruby-digger.code-maven.com/) - [source](https://github.com/szabgab/ruby-digger)
241-
242-
* [Rust Maven](https://rust.code-maven.com/) - [source](https://github.comr/szabgab/rust.code-maven.com/) - [Rust Maven SSG](https://ssg.code-maven.com/) written in Rust.
243-
* [Rust news](https://rust-news.code-maven.com/) written in Rust, collecting RSS/Atom feeds and generating the web site.
244-
245-
* Code Maven sites
246-
* Perl Maven sites
247-
248-
* [slides](https://slides.code-maven.com/) - [source](https://github.com/szabgab/slides/) - [generator](https://github.com/szabgab/slider-py) written in Python.
249-
250-
* [rust.org.il](https://rust.org.il/) - [source](https://github.com/szabgab/rust.org.il/) written in Rust.
251-
* [python.org.il](https://python.org.il/) - [source](https://gitlab.com/hamakor/python.org.il/) is written in Python but it is hosted on GitLab pages.
252-
253-
## Rename repository
254-
{id: rename-repository}
255-
256-
* Rename repository so I'll be able to demo this later as well.
257-
* Show how to access the web site now.
258-
259-
## Open Issue
260-
{id: open-issue}
261-
262-
* Show how to open an issue on the repository with a link to your site and repository.
263-
* Show with my own site.
264-
265-
## Add table of people
266-
{id: add-table-of-people}
267-
268-
* Take the data from the issue and add it to the table listing the web sites.
269-

Diff for: github-pages/src/SUMMARY.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# GitHub pages
2+
3+
- [GitHub Pages](./github-pages.md)
4+
- [Why use version control?](./why-use-version-control.md)
5+
- [GitHub Account](./github-account.md)
6+
- [Repositories](./github-repositories.md)
7+
- [GitHub Avatar](./github-avatar.md)
8+
- [Setting up GitHub page](./setting-up-github-page.md)
9+
- [HTML - view source](./html-view-source.md)
10+
- [GitHub page with Jekyll](./github-page-with-jekyll.md)
11+
- [Markdown Links](./markdown-links.md)
12+
- [Markdown](./markdown.md)
13+
- [Add page](./add-another-page.md)
14+
- [Customized 404 Page not found](./page-not-found.md)
15+
- [Jekyll themes](./jekyll-themes.md)
16+
- [Themes - layout](./theme-layout.md)
17+
- [Site-wise configuration](./site-wise-configuration.md)
18+
- [Page-specific configuration - frontmatter](./page-specific-configuration.md)
19+
- [JavaScript code](./javascript-code.md)
20+
- [Load jQuery and add jQuery code](./load-jquery-code.md)
21+
- [Add a JSON file, load it with jQuery and display the content](./load-json-file.md)
22+
- [HTML pages](./html-pages.md)
23+
- [Examples](./examples.md)
24+
- [Rename repository](./rename-repository.md)
25+
- [Open Issue](./open-issue.md)
26+
- [Add table of people](./add-table-of-people.md)
27+
28+
29+
30+

Diff for: github-pages/src/add-another-page.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Add page
2+
3+
* Create a file called `about.md`.
4+
* Visit https://USERNAME.github.io/about
5+
* Show how to link to it from the main page.
6+
7+
```markdown
8+
{{#include ../examples/about.md}}
9+
```
10+
11+

Diff for: github-pages/src/add-table-of-people.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Add table of people
2+
3+
4+
* Take the data from the issue and add it to the table listing the web sites.

Diff for: github-pages/src/examples.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Examples
2+
3+
* [rustatic](https://rustatic.code-maven.com/) - [source](https://github.com/szabgab/rustatic/) using Jekyll.
4+
* my simple site [github.szabgab.com](https://github.szabgab.com/) - [source](https://github.com/szabgab/real-szabgab.github.io) using only Markdown files and the default Jekyll processor on GitHub pages.
5+
* [Kantoniko](https://kantoniko.com/) - [source](https://github.com/kantoniko/) - using Python combining data from many repositories. A dictionary and content in Ladino. Written in Python collecting data from multiple repositories.
6+
* my personal site [szabgab.com](https://szabgab.com/) - [source](https://github.com/szabgab/szabgab.com) - using Perl.
7+
* [Perl Weekly](https://perlweekly.com/) - [source](https://github.com/szabgab/perlweekly) - Perl, generate the site locally and push the HTML files as well.
8+
9+
* The students of [WIS Python course started in 2024-04](https://github.com/szabgab/wis-python-course-2024-04)
10+
* The students of [WIS Python course started in 2024-11](https://github.com/szabgab/wis-python-course-2024-11)
11+
12+
13+
* [Planet Perl](https://perl.theplanetarium.org/) - [source](https://github.com/PerlToolsTeam/planetperl) using Perl.
14+
* [Forem Reports](https://forem.code-maven.com/) - [source](https://github.com/szabgab/forem-reports).
15+
* [(Rust) virtual events](https://events.code-maven.com/) - [source](https://github.com/szabgab/virtual-events).
16+
* [Ruby Digger](https://ruby-digger.code-maven.com/) - [source](https://github.com/szabgab/ruby-digger)
17+
18+
* [Rust Maven](https://rust.code-maven.com/) - [source](https://github.comr/szabgab/rust.code-maven.com/) - [Rust Maven SSG](https://ssg.code-maven.com/) written in Rust.
19+
* [Rust news](https://rust-news.code-maven.com/) written in Rust, collecting RSS/Atom feeds and generating the web site.
20+
21+
* Code Maven sites
22+
* Perl Maven sites
23+
24+
* [slides](https://slides.code-maven.com/) - [source](https://github.com/szabgab/slides/) - [generator](https://github.com/szabgab/slider-py) written in Python.
25+
26+
* [rust.org.il](https://rust.org.il/) - [source](https://github.com/szabgab/rust.org.il/) written in Rust.
27+
* [python.org.il](https://python.org.il/) - [source](https://gitlab.com/hamakor/python.org.il/) is written in Python but it is hosted on GitLab pages.
28+
29+

Diff for: github-pages/src/github-account.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# GitHub Account
2+
3+
* If you don't have an account yet on [GitHub](https://github.com/) then create one now.
4+
* It should be personal. It will remain with you for your life. (or the life of GitHub)
5+
* It should not be related to your current educational institute or workplace or this presentation or course.
6+
7+
* My account is [szabgab on GitHub](https://github.com/szabgab/). It is my nickname almost everywhere on the Internet. It is even the address of [my web site](https://szabgab.com/).
8+
9+

Diff for: github-pages/src/github-avatar.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# GitHub Avatar
2+
3+
* Update your profile, add information about yourself.
4+
* Add a picture or an avatar of you to make your account more recognizable.
5+
* Your profile / Edit profile / ...
6+
7+
* The big text comes from the `README.md` file of the [szabgab/szabgab](https://github.com/szabgab/szabgab) repository.
8+
9+

Diff for: github-pages/src/github-page-with-jekyll.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# GitHub page with Jekyll
2+
3+
* [Jekyll](https://jekyllrb.com/) a static site generator
4+
5+
* Many [Static Site Generators](https://jamstack.org/generators/).
6+
7+
8+

Diff for: github-pages/src/github-pages.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# GitHub Pages

0 commit comments

Comments
 (0)