Skip to content

Commit 52bda43

Browse files
authored
Merge pull request #56 from dscho/hugo
Migrate to Hugo
2 parents 9d6731d + c7866b6 commit 52bda43

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+413
-2966
lines changed

.github/workflows/deploy.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Deploy to Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
deploy:
20+
runs-on: ubuntu-latest
21+
environment:
22+
name: github-pages
23+
url: ${{ steps.deployment.outputs.page_url }}
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: configure Hugo
27+
run: |
28+
set -x &&
29+
echo "HUGO_VERSION=$(sed -n 's/^ *hugo_version: *//p' <hugo.yml)" >>$GITHUB_ENV
30+
- name: install Hugo ${{ env.HUGO_VERSION }}
31+
run: |
32+
set -x &&
33+
deb=hugo_extended_${HUGO_VERSION}_linux-amd64.deb &&
34+
curl -LO https://github.com/gohugoio/hugo/releases/download/v$HUGO_VERSION/$deb &&
35+
sudo dpkg -i $deb
36+
- uses: actions/configure-pages@v5
37+
id: pages
38+
- name: run Hugo to build the pages
39+
env:
40+
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
41+
HUGO_ENVIRONMENT: production
42+
HUGO_RELATIVEURLS: false
43+
run: hugo config && hugo --minify --baseURL '${{ steps.pages.outputs.base_url }}/'
44+
- uses: actions/upload-pages-artifact@v3
45+
with:
46+
path: ./public
47+
- uses: actions/deploy-pages@v4
48+
id: deployment

.github/workflows/pr.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Hugo
2+
on: [pull_request]
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
- name: configure Hugo
10+
run: |
11+
set -x &&
12+
echo "HUGO_VERSION=$(sed -n 's/^ *hugo_version: *//p' <hugo.yml)" >>$GITHUB_ENV
13+
- name: install Hugo ${{ env.HUGO_VERSION }}
14+
run: |
15+
set -x &&
16+
curl -Lo /tmp/hugo.deb https://github.com/gohugoio/hugo/releases/download/v$HUGO_VERSION/hugo_extended_${HUGO_VERSION}_linux-amd64.deb &&
17+
sudo dpkg -i /tmp/hugo.deb
18+
- name: run Hugo to build the pages
19+
run: hugo
20+
- name: build tar archive
21+
run: cd public && tar czvf ../pages.tar.gz *
22+
- name: Upload build artifact
23+
uses: actions/upload-artifact@v4
24+
with:
25+
name: pages
26+
path: pages.tar.gz

.gitignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
/node_modules/
2-
/npm-debug.log
1+
/.hugo_build.lock
2+
/public/
3+
/resources/_gen/

32-bit.html

-82
This file was deleted.

Gruntfile.js

-84
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

assets/sass/pack.scss

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@import 'normalize';
2+
@import 'jquery.fancybox';
3+
@import 'style';
4+
@import 'small';
File renamed without changes.

css/style.css renamed to assets/sass/style.scss

+14-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ div.version {
247247
margin-top: 0;
248248
}
249249

250-
.details p a {
250+
.details p a:not(.button) {
251251
color: #A3CFFF;
252252
text-decoration: underline;
253253
}
@@ -349,3 +349,16 @@ div.version {
349349
.stud {
350350
clear: both;
351351
}
352+
body.page {
353+
color: #FFF;
354+
355+
h1 {
356+
text-align: center;
357+
}
358+
359+
article p,h3,ul {
360+
margin-left: auto;
361+
margin-right: auto;
362+
width: 65%;
363+
}
364+
}

bump-version.js

+7-18
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,15 @@ var die = (err) => {
1313
};
1414

1515
var updateVersion = (version, tag, timestamp, url) => {
16-
var regex = /<div class="version">.*?<\/div>/gm;
17-
var replacement = '<div class="version"><a href="' + url
18-
+ '" title="Version ' + version + ' was published on '
19-
+ timestamp + '">Version ' + version + '</a></div>';
20-
fs.writeFileSync('latest-version.txt', version);
21-
fs.writeFileSync('latest-tag.txt', tag);
22-
const urlPrefix = `https://github.com/git-for-windows/git/releases/download/${tag}`;
23-
for (const suffix of ['64-bit', '32-bit', 'arm64']) {
24-
fs.writeFileSync(`latest-${suffix}-installer.url`,
25-
`${urlPrefix}/Git-${version}-${suffix}.exe`);
26-
fs.writeFileSync(`latest-${suffix}-portable-git.url`,
27-
`${urlPrefix}/PortableGit-${version}-${suffix}.7z.exe`);
28-
fs.writeFileSync(`latest-${suffix}-mingit.url`,
29-
`${urlPrefix}/MinGit-${version}-${suffix}.zip`);
30-
}
31-
fs.readFile('index.html', 'utf8', (err, data) => {
16+
fs.readFile('hugo.yml', 'utf8', (err, data) => {
3217
if (err)
3318
die(err);
34-
data = data.replace(regex, replacement);
35-
fs.writeFileSync('index.html', data);
19+
data = data
20+
.replace(/^( version: ).*/, `$1${version}`)
21+
.replace(/^( tag_name: ).*/, `$1${tag}`)
22+
.replace(/^( publish_date: ).*/, `$1"${timestamp}"`)
23+
.replace(/^( url: ).*/, `$1"${url}"`);
24+
fs.writeFileSync('hugo.yml', data);
3625
});
3726
};
3827

32-bit.md renamed to content/32-bit.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---
2+
title: 32-bit
3+
---
14
# 32-bit support of Git for Windows
25

36
While Git for Windows v1.x was only ever offered as 32-bit installer (i.e. targeting the i686 CPU architecture), with the switch of Git for Windows v2.x in August 2015 to depend on [MSYS2](https://www.msys2.org/), there have been two variants: the 32-bit and the 64-bit (x86\_64) one.

0 commit comments

Comments
 (0)