Skip to content

Commit 384132a

Browse files
committed
favicon added and compressed, deps updated, migrated to nextra v3, build wf updated, tailwindcss added.
1 parent b4be176 commit 384132a

File tree

81 files changed

+3281
-2024
lines changed

Some content is hidden

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

81 files changed

+3281
-2024
lines changed

.github/workflows/deploy.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- name: Setup Node
4545
uses: actions/setup-node@v4
4646
with:
47-
node-version: "21"
47+
node-version: "20"
4848
cache: ${{ steps.detect-package-manager.outputs.manager }}
4949
- name: Setup Pages
5050
uses: actions/configure-pages@v5
@@ -64,10 +64,16 @@ jobs:
6464
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
6565
- name: Build with Next.js
6666
run: ${{ steps.detect-package-manager.outputs.runner }} next build
67+
- name: Sitemap update
68+
run: |
69+
npm i @cresteem/hawk-js -g
70+
cp hawk.config.json ./out/hawk.config.json
71+
cd out
72+
hawk genmap || true
6773
- name: Upload artifact
6874
uses: actions/upload-pages-artifact@v3
6975
with:
70-
path: ./dist
76+
path: ./out
7177

7278
# Deployment job
7379
deploy:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.next
22
node_modules
33
next-env.d.ts
4-
dist
4+
out
55
gserv.json
66
.hawk.lrs

components/utils.tsx

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

dev/compress-images.mjs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { compressImages } from "@cresteem/minomax";
2+
3+
class Compress {
4+
favicons() {
5+
// compress favicons
6+
compressImages("public/favicons/*png", "webp", "compressed").catch(
7+
console.error
8+
);
9+
}
10+
11+
svg() {
12+
// compress all svg
13+
compressImages("public/**/*svg", "svg", "compressed").catch(console.error);
14+
}
15+
16+
serviceImages() {
17+
// compress service visuals
18+
compressImages(
19+
"public/services-visuals/**/*{jpg,webp}",
20+
"avif",
21+
"compressed"
22+
).catch(console.error);
23+
}
24+
25+
brandAssets() {
26+
// compress brand-assets non-svg
27+
compressImages(
28+
"public/brand-assets/*{png,webp}",
29+
"webp",
30+
"compressed"
31+
).catch(console.error);
32+
}
33+
}
34+
35+
new Compress().favicons();

dev/fav.webp

24.5 KB
Loading
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { basename, join } from "path";
55
export async function generateFavicons(
66
metaDesc,
77
version,
8-
baseImage = "fav.png",
8+
baseImage = "./dev/fav.webp",
99
appName = basename(process.cwd()),
1010
basepath = join(process.cwd(), "public"),
1111
faviconsPath = "favicons",
@@ -75,5 +75,5 @@ export async function generateFavicons(
7575

7676
generateFavicons(
7777
"Hawk JS is the ultimate tool for web developers and SEO enthusiasts. Find out how it can streamline your SEO efforts, ensuring your website gains visibility and improves its search engine ranking.",
78-
"1.0.7"
78+
"1.5.0"
7979
);

fav.png

-539 KB
Binary file not shown.

next.config.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1-
const withNextra = require("nextra")({
1+
import nextra from "nextra";
2+
3+
const withNextra = nextra({
24
theme: "nextra-theme-docs",
3-
themeConfig: "./theme.config.tsx",
5+
themeConfig: "./theme.config.jsx",
46
staticImage: true,
57
});
68

7-
module.exports = {
9+
const config = {
810
...withNextra(),
911
images: {
1012
unoptimized: true,
1113
},
1214
basePath: "",
1315
output: "export",
14-
distDir: "dist",
16+
distDir: "out",
17+
sassOptions: { silenceDeprecations: ["legacy-js-api"] },
1518
};
19+
20+
export default config;

package.json

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,20 @@
2222
},
2323
"homepage": "https://hawkjs.cresteem.com/",
2424
"devDependencies": {
25-
"@types/node": "latest",
26-
"next": "latest",
27-
"nextra": "latest",
28-
"nextra-theme-docs": "latest",
25+
"@types/node": "22.10.1",
26+
"@types/react": "^18.3.12",
27+
"acorn": "^8.14.0",
28+
"autoprefixer": "^10.4.20",
29+
"next": "15.0.3",
30+
"nextra": "3.2.4",
31+
"nextra-theme-docs": "3.2.4",
32+
"postcss": "^8.4.49",
2933
"react": "latest",
3034
"react-dom": "latest",
31-
"react-icons": "^5.2.0",
32-
"sass": "latest",
33-
"typescript": "latest"
35+
"react-icons": "^5.3.0",
36+
"sass": "1.81.0",
37+
"tailwindcss": "^3.4.15",
38+
"typescript": "5.7.2"
3439
},
3540
"dependencies": {
3641
"favicons": "^7.2.0"

pages/_app.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import "../stylesheets/globals.scss";
2+
3+
export default function App({
4+
Component,
5+
pageProps,
6+
}: {
7+
Component: any;
8+
pageProps: Record<any, any>;
9+
}) {
10+
return <Component {...pageProps} />;
11+
}

0 commit comments

Comments
 (0)