Skip to content

Commit a5f2b19

Browse files
authored
Merge pull request #51 from chalin/chalin-im-move-redirects-to-static-2024-07-24
[cleanup] Move _redirects from public to static
2 parents b7d3ac3 + 366c0d3 commit a5f2b19

File tree

6 files changed

+25
-28
lines changed

6 files changed

+25
-28
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ npm install
3535

3636
We use Hugo to build the site. Follow the [Hugo installation guide](https://gohugo.io/installation/) to install Hugo on your system.
3737

38-
### 4. Serve the Project
38+
### 4. Serve the website
3939

40-
Once Hugo is installed, you can serve the project locally to see your changes in real-time.
41-
The root of the directory contains a `Makefile` for automating development processes. The `make` CLI tool is usually installed by default on most systems (excluding Windows), but you can check if it is installed by running `make --version` on your terminal. If this command is unsuccessful, you will need to find the standard method for installing it for your system. For installing `make` on Windows, please see [here](https://gnuwin32.sourceforge.net/packages/make.htm).
42-
Run the following command:
40+
Once Hugo is installed, you can locally serve the website to see your changes in
41+
real-time:
4342

4443
```sh
45-
make serve
44+
npm run serve
4645
```
4746

48-
This will start a local server. You can view your site at the URL displayed in your terminal.
47+
This starts a local server. View the site at the URL displayed in your
48+
terminal, usually <http://localhost:1313>.
4949

5050
## Need Help?
5151

Makefile

Lines changed: 0 additions & 16 deletions
This file was deleted.

layouts/partials/css.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
{{ $inServerMode := site.IsServer }}
21
{{ $includePaths := (slice "node_modules") }}
32
{{ $sass := "sass/style.sass" }}
43
{{ $cssOutput := "css/style.css" }}
54
{{ $devOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "enableSourceMap" true) }}
65
{{ $prodOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "outputStyle" "compressed") }}
7-
{{ $cssOpts := cond $inServerMode $devOpts $prodOpts }}
6+
{{ $cssOpts := cond hugo.IsProduction $prodOpts $devOpts }}
87
{{ $css := resources.Get $sass | resources.ExecuteAsTemplate $sass . | toCSS $cssOpts }}
9-
{{ if $inServerMode }}
8+
{{ if not hugo.IsProduction }}
109
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
1110
{{ else }}
1211
{{ $prodCss := $css | fingerprint }}

netlify.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[build]
22
publish = "public"
3-
command = "make preview-build"
3+
command = "npm run build:preview"
44

55
[context.production]
6-
command = "make production-build"
6+
command = "npm run build:production"
77

88
[[headers]]
99
for = "/*"

package.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
{
2+
"scripts": {
3+
"_build": "npm run _hugo-dev --",
4+
"_hugo": "hugo --cleanDestinationDir",
5+
"_hugo-dev": "npm run _hugo -- -e dev -DF",
6+
"_serve": "npm run _hugo-dev -- serve --minify --disableFastRender",
7+
"build:preview": "npm run _hugo-dev -- --minify --baseURL \"${DEPLOY_PRIME_URL:-http://localhost}\"",
8+
"build:production": "npm run _hugo -- --minify",
9+
"build": "npm run _build --",
10+
"clean": "rm -Rf node_modules public/* resources",
11+
"make:public": "mkdir -p public && git init -b main public",
12+
"serve": "npm run _serve --",
13+
"test": "npm run build"
14+
},
215
"devDependencies": {
316
"bulma": "^0.9.4",
417
"hugo-extended": "^0.111.3"
5-
}
18+
},
19+
"spelling": "cSpell:ignore bulma -"
620
}
File renamed without changes.

0 commit comments

Comments
 (0)