Skip to content

Commit

Permalink
Merge pull request #51 from chalin/chalin-im-move-redirects-to-static…
Browse files Browse the repository at this point in the history
…-2024-07-24

[cleanup] Move _redirects from public to static
  • Loading branch information
lukpueh authored Aug 2, 2024
2 parents b7d3ac3 + 366c0d3 commit a5f2b19
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 28 deletions.
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ npm install

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

### 4. Serve the Project
### 4. Serve the website

Once Hugo is installed, you can serve the project locally to see your changes in real-time.
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).
Run the following command:
Once Hugo is installed, you can locally serve the website to see your changes in
real-time:

```sh
make serve
npm run serve
```

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

## Need Help?

Expand Down
16 changes: 0 additions & 16 deletions Makefile

This file was deleted.

5 changes: 2 additions & 3 deletions layouts/partials/css.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{{ $inServerMode := site.IsServer }}
{{ $includePaths := (slice "node_modules") }}
{{ $sass := "sass/style.sass" }}
{{ $cssOutput := "css/style.css" }}
{{ $devOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "enableSourceMap" true) }}
{{ $prodOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "outputStyle" "compressed") }}
{{ $cssOpts := cond $inServerMode $devOpts $prodOpts }}
{{ $cssOpts := cond hugo.IsProduction $prodOpts $devOpts }}
{{ $css := resources.Get $sass | resources.ExecuteAsTemplate $sass . | toCSS $cssOpts }}
{{ if $inServerMode }}
{{ if not hugo.IsProduction }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
{{ else }}
{{ $prodCss := $css | fingerprint }}
Expand Down
4 changes: 2 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[build]
publish = "public"
command = "make preview-build"
command = "npm run build:preview"

[context.production]
command = "make production-build"
command = "npm run build:production"

[[headers]]
for = "/*"
Expand Down
16 changes: 15 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
{
"scripts": {
"_build": "npm run _hugo-dev --",
"_hugo": "hugo --cleanDestinationDir",
"_hugo-dev": "npm run _hugo -- -e dev -DF",
"_serve": "npm run _hugo-dev -- serve --minify --disableFastRender",
"build:preview": "npm run _hugo-dev -- --minify --baseURL \"${DEPLOY_PRIME_URL:-http://localhost}\"",
"build:production": "npm run _hugo -- --minify",
"build": "npm run _build --",
"clean": "rm -Rf node_modules public/* resources",
"make:public": "mkdir -p public && git init -b main public",
"serve": "npm run _serve --",
"test": "npm run build"
},
"devDependencies": {
"bulma": "^0.9.4",
"hugo-extended": "^0.111.3"
}
},
"spelling": "cSpell:ignore bulma -"
}
File renamed without changes.

0 comments on commit a5f2b19

Please sign in to comment.