Skip to content

Commit 8a12546

Browse files
committed
Hugo static site
Signed-off-by: Patrick Magee <[email protected]>
1 parent 3f45bda commit 8a12546

39 files changed

+1256
-34
lines changed

.github/workflows/hugo.yaml

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Sample workflow for building and deploying a Hugo site to GitHub Pages
2+
name: Deploy Hugo site to Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches:
8+
- main
9+
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
20+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
21+
concurrency:
22+
group: "pages"
23+
cancel-in-progress: false
24+
25+
# Default to bash
26+
defaults:
27+
run:
28+
shell: bash
29+
30+
jobs:
31+
# Build job
32+
build:
33+
runs-on: ubuntu-latest
34+
env:
35+
HUGO_VERSION: 0.141.0
36+
steps:
37+
- name: Install Hugo CLI
38+
run: |
39+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
40+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
41+
- name: Install Dart Sass
42+
run: sudo snap install dart-sass
43+
- name: Checkout
44+
uses: actions/checkout@v4
45+
with:
46+
submodules: recursive
47+
fetch-depth: 0
48+
- name: Setup Pages
49+
id: pages
50+
uses: actions/configure-pages@v5
51+
- name: Install Node.js dependencies
52+
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
53+
- name: Build with Hugo
54+
env:
55+
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
56+
HUGO_ENVIRONMENT: production
57+
TZ: Europe/London
58+
run: |
59+
cd docs
60+
hugo \
61+
--gc \
62+
--minify \
63+
--baseURL "${{ steps.pages.outputs.base_url }}/"
64+
- name: Upload artifact
65+
uses: actions/upload-pages-artifact@v3
66+
with:
67+
path: ./docs/public
68+
69+
# Deployment job
70+
deploy:
71+
environment:
72+
name: github-pages
73+
url: ${{ steps.deployment.outputs.page_url }}
74+
runs-on: ubuntu-latest
75+
needs: build
76+
steps:
77+
- name: Deploy to GitHub Pages
78+
id: deployment
79+
uses: actions/deploy-pages@v4

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -452,3 +452,9 @@ $RECYCLE.BIN/
452452
!.vscode/tasks.json
453453
!.vscode/launch.json
454454
!.vscode/extensions.json
455+
456+
457+
# Hugo output
458+
459+
docs/public/
460+
.hugo_build.lock

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "docs/themes/hugo-scroll"]
2+
path = docs/themes/hugo-scroll
3+
url = https://github.com/zjedi/hugo-scroll.git

README.md

+9-32
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44

55
An objective timer tracker with audio notifications for Dota2. This application is designed to help players keep track of important in-game events such as stacking, power runes, bounty runes, and more. The application is designed to be used in conjunction with the Game State Integration feature of Dota2.
66

7-
## Support
87

9-
If you find this application useful, please consider supporting me by buying me a coffee.
8+
## Download
9+
10+
1. Visit the [releases page](https://github.com/pjmagee/dota2-helper/releases).
11+
2. Download the latest version e.g. `Dota2Helper_v1.0.4_windows_amd64.zip`
12+
3. Extract the zip file which contains the full application.
13+
4. Run the `Dota2Helper.Desktop.exe`
1014

11-
[![Buy Me A Coffee](https://cdn.buymeacoffee.com/buttons/default-orange.png)](https://www.buymeacoffee.com/pjmagee)
1215

1316
## Platform
1417

@@ -78,35 +81,9 @@ This application runs a small local web server waiting for Dota2 to post the gam
7881

7982
Valve does not seem to have dedicated GSI documentation for Dota2, but the concept and configuration is similar to Valves CSGO GSI, which is documented [here](https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Game_State_Integration).
8083

81-
## How to?
82-
83-
1. Visit the [releases page](https://github.com/pjmagee/dota2-helper/releases).
84-
2. Download the latest version e.g. `Dota2Helper_v1.0.4_windows_amd64.zip`
85-
3. Extract the zip file which contains the full application.
86-
4. Run the `Dota2Helper.Desktop.exe`
87-
88-
89-
### Preview
90-
91-
https://github.com/user-attachments/assets/505a08f3-24fe-4d41-a8b3-b867670b5910
92-
93-
### Screenshots
94-
95-
<details>
96-
<summary>Profiles</summary>
9784

98-
![profiles](./docs/settings-profiles.png)
99-
</details>
100-
101-
<details>
102-
103-
<summary>Timers</summary>
104-
105-
![timers](./docs/settings-timers.png)
106-
</details>
85+
## Support
10786

108-
<details>
109-
<summary>Overlay</summary>
87+
If you find this application useful, please consider supporting me by buying me a coffee.
11088

111-
![overlay](./docs/timers-window.png)
112-
</details>
89+
[![Buy Me A Coffee](https://cdn.buymeacoffee.com/buttons/default-orange.png)](https://www.buymeacoffee.com/pjmagee)

dagger/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ func (m *Dota2Helper) DotnetContainer() *dagger.Container {
6767

6868
// Scan the project for used packages and bundle licenses and metadata into a single file
6969
func (m *Dota2Helper) GetPackagesFile(
70-
// +defaultPath="."
71-
// +ignore=["**/bin", "**/obj", "**/.idea", "**/docs", "**/.github", "**/.gitignore"]
70+
// +defaultPath="."
71+
// +ignore=["**/bin", "**/obj", "**/.idea", "**/docs", "**/.github", "**/.gitignore"]
7272
git *dagger.Directory) *dagger.File {
7373

7474
return m.DotnetContainer().

docs/archetypes/default.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
+++
2+
date = '{{ .Date }}'
3+
draft = true
4+
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
5+
+++

docs/assets/cover/intro.mp4

15.7 MB
Binary file not shown.

docs/assets/images/1.png

301 KB
Loading

docs/assets/images/2.png

10.3 KB
Loading

docs/assets/images/3.png

39 KB
Loading

docs/assets/images/4.png

90.4 KB
Loading

docs/assets/images/5.png

43.2 KB
Loading

docs/assets/js/carousel.js

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Select DOM elements
2+
const track = document.querySelector('.carousel-track');
3+
const slides = Array.from(track.children);
4+
const nextButton = document.querySelector('.carousel-button.next');
5+
const prevButton = document.querySelector('.carousel-button.prev');
6+
7+
let currentIndex = 0;
8+
9+
// Update carousel position
10+
function updateCarousel() {
11+
const slideWidth = slides[0].getBoundingClientRect().width;
12+
track.style.transform = `translateX(-${currentIndex * slideWidth}px)`;
13+
}
14+
15+
// Event listeners for navigation buttons
16+
nextButton.addEventListener('click', () => {
17+
if (currentIndex < slides.length - 1) {
18+
currentIndex++;
19+
updateCarousel();
20+
}
21+
});
22+
23+
prevButton.addEventListener('click', () => {
24+
if (currentIndex > 0) {
25+
currentIndex--;
26+
updateCarousel();
27+
}
28+
});
29+
30+
// Initialize the carousel layout
31+
window.addEventListener('DOMContentLoaded', () => {
32+
const slideWidth = slides[0].getBoundingClientRect().width;
33+
slides.forEach((slide, index) => {
34+
slide.style.left = `${index * slideWidth}px`;
35+
});
36+
});
37+
38+
// Handle resizing to keep the layout consistent
39+
window.addEventListener('resize', updateCarousel);
File renamed without changes.

docs/content/en/_index.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
# Striking header background image, Ideal images are homogenous around the centre and contrasting to the text. Non-ideal images can use `title_guard`
3+
# header_image: "images/cover-image.jpg"
4+
#
5+
# When set true, uses video from custom_header_video.html partial, instead of header_image
6+
header_use_video: true
7+
#
8+
# Optional header logo. CSS: `#blog-logo`, with max-height defined, optimize to prevent scaling
9+
# header_logo: "images/chef-hat.png"
10+
#
11+
# Headers are safeHTML, you can use HTML tags such as b,i,u,br
12+
header_headline: "DOTA 2 Helper"
13+
header_subheadline: "The <b>Objective</b> timer tracker"
14+
15+
# Add a 'Go back to top' item to the navigation menu
16+
# Title: name of navigation menu entry
17+
# Weight (i. e. position in menu): none = no menu entry, first = add as first entry, last = ad as last entry
18+
nav_to_top_title: "Return To Top"
19+
nav_to_top_weight: last
20+
---

docs/content/en/homepage/carousel.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: 'Screenshots'
3+
4+
# The "header_menu_title" value will be used as text for header buttons.
5+
# The "title" value will be used if value for "header_menu_title" is not provided.
6+
#header_menu_title: 'Short Menu Title'
7+
8+
# The "navigation_menu_title" value will be used as text for fixed menu items.
9+
# The "title" value will be used if value for "navigation_menu_title" is not provided.
10+
#navigation_menu_title: 'Short Menu Title'
11+
12+
# The "weight" will determine where this section appears on the "homepage".
13+
# A bigger weight will place the content more towards the bottom of the page.
14+
# It's like gravity ;-).
15+
weight: 5
16+
17+
# If "header_menu" is true, then a button linking to this section will be placed
18+
# into the header menu at the top of the homepage.
19+
header_menu: false
20+
---
21+
22+
{{< carousel >}}

docs/content/en/homepage/contact.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: "Contact me"
3+
weight: 99
4+
header_menu: false
5+
---
6+
7+
---
8+
9+
Dota 2 Helper
10+
420 Dire Operations
11+
Top Lane
12+
Ancient Tower #3
13+
Hellfire Abyss
14+
15+
{{<contact_list>}}

docs/content/en/homepage/demo.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: 'Video Demo'
3+
4+
# The "header_menu_title" value will be used as text for header buttons.
5+
# The "title" value will be used if value for "header_menu_title" is not provided.
6+
#header_menu_title: 'Short Menu Title'
7+
8+
# The "navigation_menu_title" value will be used as text for fixed menu items.
9+
# The "title" value will be used if value for "navigation_menu_title" is not provided.
10+
#navigation_menu_title: 'Short Menu Title'
11+
12+
# The "weight" will determine where this section appears on the "homepage".
13+
# A bigger weight will place the content more towards the bottom of the page.
14+
# It's like gravity ;-).
15+
weight: 5
16+
17+
# If "header_menu" is true, then a button linking to this section will be placed
18+
# into the header menu at the top of the homepage.
19+
header_menu: false
20+
---
21+
22+
---
23+
24+
{{< demo >}}

docs/content/en/homepage/download.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: "Download"
3+
weight: 1
4+
header_menu: true
5+
external: https://github.com/pjmagee/dota2-helper/releases
6+
---

docs/content/en/homepage/faq.md

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: 'F.A.Q'
3+
4+
# The "header_menu_title" value will be used as text for header buttons.
5+
# The "title" value will be used if value for "header_menu_title" is not provided.
6+
#header_menu_title: 'Short Menu Title'
7+
8+
# The "navigation_menu_title" value will be used as text for fixed menu items.
9+
# The "title" value will be used if value for "navigation_menu_title" is not provided.
10+
#navigation_menu_title: 'Short Menu Title'
11+
12+
# The "weight" will determine where this section appears on the "homepage".
13+
# A bigger weight will place the content more towards the bottom of the page.
14+
# It's like gravity ;-).
15+
weight: 50
16+
17+
# If "header_menu" is true, then a button linking to this section will be placed
18+
# into the header menu at the top of the homepage.
19+
header_menu: false
20+
---
21+
22+
---
23+
24+
25+
#### Where is the installer?
26+
27+
There is no installer. Unzip the file and run the executable `Dota2Helper.Desktop.exe`
28+
29+
#### Where are the settings stored?
30+
31+
The settings are stored in the file `appsettings.json` in the same folder as the executable.
32+
33+
#### Does it support all platforms?
34+
35+
Only Windows is supported. There are no plans to support other platforms at this time.
36+
37+
#### Is the software free to use?
38+
39+
Yes, the software is free to use.
40+
41+
#### How does GSI work?
42+
43+
GSI is a feature of the DOTA 2 Game Engine that allows third-party applications to receive information about the game you are currently playing. This information is sent to the application in real-time, allowing it to provide additional features to the user. In the case of Dota 2 Helper, GSI is used to track the game timer and provide additional information to the user.
44+
45+
#### I'm not seeing any timers, what's wrong?
46+
47+
Check that the port is not being used by another process, that the -gamestateintegration flag is set in the launch options of DOTA 2 in Steam, and that you have a profile selected with enabled timers.
48+
49+
#### I am only seeing Demo timers, what's wrong?
50+
51+
Open the settings and ensure Timer mode is set to 'Auto' or 'Game', not 'Demo'
52+
53+
#### Will I get banned?
54+
55+
Using this software does not violate the Steam Subscriber Agreement or the Dota 2 terms of service. It does not modify the game in any way. It's like having a coach sitting next to you, providing you with additional information to help you play better.
56+
57+
No, this software does not modify the game in any way. It simply utilises the game engines built in features to provide additional information to the user, using the `-gamestateintegration` feature. Many existing popular tools use this feature, such as Overwolf, SteelSeries GameSense, and others.

0 commit comments

Comments
 (0)