Skip to content

Commit af77a6a

Browse files
committed
feat: add comments, and improve tooling description
1 parent 529733f commit af77a6a

8 files changed

Lines changed: 253 additions & 88 deletions

File tree

.github/workflows/documentation.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Install dependencies
3030
run: |
3131
apt install -y doxygen gource libgs-dev
32-
pip3 install jinja2 Pygments mkdocs-material mkdocs mkdocs-same-dir mkdocs-minify-plugin mkdocs-redirects mkdocs-exclude
32+
pip3 install jinja2 Pygments mkdocs-material mkdocs mkdocs-same-dir mkdocs-minify-plugin mkdocs-redirects mkdocs-exclude mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin
3333
npm install
3434
3535
- name: Configure

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ site/
4141
# caches
4242
node_modules/
4343
package-lock.json
44+
.cache

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ time for you to revisit them.
55
- If you just want to read use the [pre-rendered documentation here](https://courses.tolstenko.net) the examples will work better there.
66
- If you want to go deep and propose changes to repo, use the [github repo](https://github.com/InfiniBrains/Awesome-GameDev-Resources).
77

8-
98
# Badges
109

1110
CI: [![Documentation](https://github.com/InfiniBrains/Awesome-GameDev-Resources/actions/workflows/documentation.yaml/badge.svg)](https://github.com/InfiniBrains/Awesome-GameDev-Resources/actions/workflows/documentation.yaml)
@@ -73,3 +72,5 @@ For every type of style, I try to give a bit of insights:
7372
- I usually follow this strategy on advanced classes;
7473
- Demonstrator: explain and show things to students;
7574
- I usully provide a stream of references or even create my own content to show them how to do things;
75+
76+

intro/01-introduction/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---
2+
comments: true
3+
---
14
# Reasons why you should learn how to program with C++
25

36
Before we start, this repository aims to be practical, and I highly incentive you to look for other references. I want to add this another [awesome repository](https://github.com/federico-busato/Modern-CPP-Programming/) it holds an awesome compilation of modern C++ concepts.

intro/02-tooling/README.md

Lines changed: 155 additions & 73 deletions
Large diffs are not rendered by default.

intro/03-datatypes/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ Keep in mind that it is a good practice to choose descriptive and meaningful nam
155155
156156
It is also important to note that C++ has some naming conventions that are commonly followed by programmers. For example, it is common to use camelCase or snake_case to separate words in a variable name, and to use all lowercase letters for variables that are local to a function and all uppercase letters for constants.
157157
158+
158159
## Variable declaration
159160
160161
Variable declaration in C++ follows this pattern.

mkdocs.yml

Lines changed: 42 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
site_name: Awesome GameDev Resources
22
site_url: https://courses.tolstenko.net
33
repo_url: https://github.com/InfiniBrains/Awesome-GameDev-Resources
4+
repo_name: InfiniBrains/Awesome-GameDev-Resources
45

56
nav:
67
- Home: README.md
@@ -44,23 +45,24 @@ docs_dir: .
4445

4546
theme:
4647
name: material
48+
custom_dir: overrides
4749
features:
48-
# - announce.dismiss
50+
- announce.dismiss
4951
- content.action.edit
5052
- content.action.view
5153
- content.code.annotate
5254
- content.code.copy
53-
- content.tabs.link
55+
# - content.tabs.link
5456
- content.tooltips
5557
# - header.autohide
56-
- navigation.expand
58+
# - navigation.expand
5759
- navigation.footer
5860
- navigation.indexes
59-
# - navigation.instant
60-
# - navigation.prune
61+
- navigation.instant
62+
- navigation.prune
6163
- navigation.sections
6264
- navigation.tabs
63-
# - navigation.tabs.sticky
65+
- navigation.tabs.sticky
6466
- navigation.top
6567
- navigation.tracking
6668
- search.highlight
@@ -104,7 +106,8 @@ theme:
104106
text: Roboto
105107
code: Roboto Mono
106108
# favicon: assets/favicon.png
107-
# icon:
109+
icon:
110+
repo: fontawesome/brands/git-alt
108111
# logo: logo
109112

110113
edit_uri: blob/main/
@@ -138,10 +141,10 @@ markdown_extensions:
138141
anchor_linenums: true
139142
- pymdownx.inlinehilite
140143
- pymdownx.keys
141-
# - pymdownx.magiclink:
142-
# repo_url_shorthand: true
143-
# user: squidfunk
144-
# repo: mkdocs-material
144+
- pymdownx.magiclink:
145+
repo_url_shorthand: true
146+
user: InfiniBrains
147+
repo: Awesome-GameDev-Resources
145148
- pymdownx.mark
146149
- pymdownx.smartsymbols
147150
- pymdownx.superfences:
@@ -156,20 +159,46 @@ markdown_extensions:
156159
- pymdownx.tilde
157160

158161
plugins:
162+
- git-revision-date-localized:
163+
enable_creation_date: true
164+
# - git-committers:
165+
# repository: InfiniBrains/Awesome-GameDev-Resources
166+
# branch: main
167+
# - git-authors
159168
- same-dir
160169
- search:
161170
separator: '[\s\-,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])'
162-
- minify
171+
- minify:
172+
minify_html: true
173+
# - optimize
163174
- exclude:
164175
glob:
165176
- node_modules/*
166177
- buildDocs/*
167178
- cmake-build-debug/*
179+
- .cache
168180

169181
extra:
182+
generator: false
183+
annotate:
184+
json: [ .s2 ]
170185
analytics:
171186
provider: google
172187
property: G-347541715
188+
feedback:
189+
title: Was this page helpful?
190+
ratings:
191+
- icon: material/emoticon-happy-outline
192+
name: This page was helpful
193+
data: 1
194+
note: >-
195+
Thanks for your feedback!
196+
- icon: material/emoticon-sad-outline
197+
name: This page could be improved
198+
data: 0
199+
note: >-
200+
Thanks for your feedback! Help us improve this page by
201+
using our <a href="..." target="_blank" rel="noopener">feedback form</a>.
173202
social:
174203
- icon: fontawesome/brands/github
175204
link: https://github.com/InfiniBrains
@@ -180,4 +209,4 @@ extra:
180209
# - icon: fontawesome/brands/python
181210
# link: https://pypi.org/project/mkdocs-material/
182211
# - icon: fontawesome/brands/twitter
183-
# link: https://twitter.com/squidfunk
212+
# link: https://twitter.com/squidfunk

overrides/partials/comments.html

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
2+
<h2 id="__comments">{{ lang.t("meta.comments") }}</h2>
3+
<!-- Insert generated snippet here -->
4+
<script src="https://giscus.app/client.js"
5+
data-repo="InfiniBrains/Awesome-GameDev-Resources"
6+
data-repo-id="R_kgDOIpptxQ"
7+
data-category="General"
8+
data-category-id="DIC_kwDOIpptxc4CTLTu"
9+
data-mapping="pathname"
10+
data-strict="0"
11+
data-reactions-enabled="1"
12+
data-emit-metadata="1"
13+
data-input-position="bottom"
14+
data-theme="preferred_color_scheme"
15+
data-lang="en"
16+
data-loading="lazy"
17+
crossorigin="anonymous"
18+
async>
19+
</script>
20+
<!-- Synchronize Giscus theme with palette -->
21+
<script>
22+
var giscus = document.querySelector("script[src*=giscus]")
23+
24+
/* Set palette on initial load */
25+
var palette = __md_get("__palette")
26+
if (palette && typeof palette.color === "object") {
27+
var theme = palette.color.scheme === "slate" ? "dark" : "light"
28+
giscus.setAttribute("data-theme", theme)
29+
}
30+
31+
/* Register event handlers after documented loaded */
32+
document.addEventListener("DOMContentLoaded", function() {
33+
var ref = document.querySelector("[data-md-component=palette]")
34+
ref.addEventListener("change", function() {
35+
var palette = __md_get("__palette")
36+
if (palette && typeof palette.color === "object") {
37+
var theme = palette.color.scheme === "slate" ? "dark" : "light"
38+
39+
/* Instruct Giscus to change theme */
40+
var frame = document.querySelector(".giscus-frame")
41+
frame.contentWindow.postMessage(
42+
{ giscus: { setConfig: { theme } } },
43+
"https://giscus.app"
44+
)
45+
}
46+
})
47+
})
48+
</script>

0 commit comments

Comments
 (0)