Skip to content

Migrate to Hugo #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Deploy to Pages

on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- name: configure Hugo
run: |
set -x &&
echo "HUGO_VERSION=$(sed -n 's/^ *hugo_version: *//p' <hugo.yml)" >>$GITHUB_ENV
- name: install Hugo ${{ env.HUGO_VERSION }}
run: |
set -x &&
deb=hugo_extended_${HUGO_VERSION}_linux-amd64.deb &&
curl -LO https://github.com/gohugoio/hugo/releases/download/v$HUGO_VERSION/$deb &&
sudo dpkg -i $deb
- uses: actions/configure-pages@v5
id: pages
- name: run Hugo to build the pages
env:
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
HUGO_ENVIRONMENT: production
HUGO_RELATIVEURLS: false
run: hugo config && hugo --minify --baseURL '${{ steps.pages.outputs.base_url }}/'
- uses: actions/upload-pages-artifact@v3
with:
path: ./public
- uses: actions/deploy-pages@v4
id: deployment
26 changes: 26 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Hugo
on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: configure Hugo
run: |
set -x &&
echo "HUGO_VERSION=$(sed -n 's/^ *hugo_version: *//p' <hugo.yml)" >>$GITHUB_ENV
- name: install Hugo ${{ env.HUGO_VERSION }}
run: |
set -x &&
curl -Lo /tmp/hugo.deb https://github.com/gohugoio/hugo/releases/download/v$HUGO_VERSION/hugo_extended_${HUGO_VERSION}_linux-amd64.deb &&
sudo dpkg -i /tmp/hugo.deb
- name: run Hugo to build the pages
run: hugo
- name: build tar archive
run: cd public && tar czvf ../pages.tar.gz *
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: pages
path: pages.tar.gz
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/node_modules/
/npm-debug.log
/.hugo_build.lock
/public/
/resources/_gen/
82 changes: 0 additions & 82 deletions 32-bit.html

This file was deleted.

84 changes: 0 additions & 84 deletions Gruntfile.js

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.
4 changes: 4 additions & 0 deletions assets/sass/pack.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@import 'normalize';
@import 'jquery.fancybox';
@import 'style';
@import 'small';
File renamed without changes.
15 changes: 14 additions & 1 deletion css/style.css → assets/sass/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ div.version {
margin-top: 0;
}

.details p a {
.details p a:not(.button) {
color: #A3CFFF;
text-decoration: underline;
}
Expand Down Expand Up @@ -349,3 +349,16 @@ div.version {
.stud {
clear: both;
}
body.page {
color: #FFF;

h1 {
text-align: center;
}

article p,h3,ul {
margin-left: auto;
margin-right: auto;
width: 65%;
}
}
25 changes: 7 additions & 18 deletions bump-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,15 @@ var die = (err) => {
};

var updateVersion = (version, tag, timestamp, url) => {
var regex = /<div class="version">.*?<\/div>/gm;
var replacement = '<div class="version"><a href="' + url
+ '" title="Version ' + version + ' was published on '
+ timestamp + '">Version ' + version + '</a></div>';
fs.writeFileSync('latest-version.txt', version);
fs.writeFileSync('latest-tag.txt', tag);
const urlPrefix = `https://github.com/git-for-windows/git/releases/download/${tag}`;
for (const suffix of ['64-bit', '32-bit', 'arm64']) {
fs.writeFileSync(`latest-${suffix}-installer.url`,
`${urlPrefix}/Git-${version}-${suffix}.exe`);
fs.writeFileSync(`latest-${suffix}-portable-git.url`,
`${urlPrefix}/PortableGit-${version}-${suffix}.7z.exe`);
fs.writeFileSync(`latest-${suffix}-mingit.url`,
`${urlPrefix}/MinGit-${version}-${suffix}.zip`);
}
fs.readFile('index.html', 'utf8', (err, data) => {
fs.readFile('hugo.yml', 'utf8', (err, data) => {
if (err)
die(err);
data = data.replace(regex, replacement);
fs.writeFileSync('index.html', data);
data = data
.replace(/^( version: ).*/, `$1${version}`)
.replace(/^( tag_name: ).*/, `$1${tag}`)
.replace(/^( publish_date: ).*/, `$1"${timestamp}"`)
.replace(/^( url: ).*/, `$1"${url}"`);
fs.writeFileSync('hugo.yml', data);
});
};

Expand Down
3 changes: 3 additions & 0 deletions 32-bit.md → content/32-bit.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
title: 32-bit
---
# 32-bit support of Git for Windows

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.
Expand Down
Loading