Skip to content

Commit

Permalink
modified: .github/workflows/deploy.yml
Browse files Browse the repository at this point in the history
	modified:   blog.config.js
	modified:   next.config.js
  • Loading branch information
MusherM committed May 29, 2024
1 parent 81c469a commit c912b61
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
npm i --registry https://registry.npmmirror.com --legacy-peer-deps -d
yarn build
yarn export
env:
NODE_ENV: production

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
Expand Down
2 changes: 1 addition & 1 deletion blog.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const BLOG = {
font: "sans-serif", // ['sans-serif', 'serif']
lightBackground: "#ffffff", // use hex value, don't forget '#' e.g #fffefc
darkBackground: "#18181B", // use hex value, don't forget '#'
path: "/nobelium", // leave this empty unless you want to deploy Nobelium in a folder
path: "", // leave this empty unless you want to deploy Nobelium in a folder
since: 2019, // If leave this empty, current year will be used.
postsPerPage: 9,
sortByDate: true,
Expand Down
45 changes: 21 additions & 24 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,38 @@
const isProd = process.env.NODE_ENV === "production";
module.exports = {
webpack5: true,
basePath: isProd ? "/nobelium" : "",
assetPrefix: isProd ? "/nobelium/" : "",
images: {
// domains: ['gravatar.com']
// unoptimized: true,
loader: 'akamai',
path: '',
loader: "akamai",
path: "",
},
eslint: {
dirs: [
'components',
'layouts',
'lib',
'pages',
]
dirs: ["components", "layouts", "lib", "pages"],
},
async headers() {
return [
{
source: '/:path*{/}?',
source: "/:path*{/}?",
headers: [
{
key: 'Permissions-Policy',
value: 'interest-cohort=()'
}
]
}
]
key: "Permissions-Policy",
value: "interest-cohort=()",
},
],
},
];
},
webpack: (config, { dev, isServer }) => {
// Replace React with Preact only in client production build
if (!dev && !isServer) {
Object.assign(config.resolve.alias, {
react: 'preact/compat',
'react-dom/test-utils': 'preact/test-utils',
'react-dom': 'preact/compat'
})
react: "preact/compat",
"react-dom/test-utils": "preact/test-utils",
"react-dom": "preact/compat",
});
config.resolve.fallback.fs = false;
}

Expand All @@ -45,13 +43,12 @@ module.exports = {
const entries = { ...(await originalEntry()) };

// These scripts can import components from the app and use ES modules
entries['scripts/generate-rss.js'] = './scripts/generate-rss.js';
entries["scripts/generate-rss.js"] = "./scripts/generate-rss.js";

return entries;
};

}

return config
}
}
return config;
},
};

0 comments on commit c912b61

Please sign in to comment.