Skip to content

Commit ce72c44

Browse files
🔧 chore: Enable ssr
1 parent d940c80 commit ce72c44

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

.dumirc.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const nav: INavItem[] = [
1919
const themeConfig: SiteThemeConfig = {
2020
actions: [
2121
{
22+
icon: 'Github',
2223
link: homepage,
2324
openExternal: true,
2425
text: 'Github',
@@ -73,8 +74,10 @@ export default defineConfig({
7374
define: {
7475
'process.env': process.env,
7576
},
77+
exportStatic: {},
7678
extraBabelPlugins: ['babel-plugin-antd-style'],
7779
favicons: ['https://lobehub.com/favicon.ico'],
80+
jsMinifier: 'swc',
7881
locales: [{ id: 'en-US', name: 'English' }],
7982
mfsu: isWin ? undefined : {},
8083
npmClient: 'pnpm',
@@ -87,6 +90,7 @@ export default defineConfig({
8790
sitemap: {
8891
hostname: 'https://icons.lobehub.com',
8992
},
93+
ssr: isProduction ? {} : false,
9094
styles: [
9195
`html, body { background: transparent; }
9296

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,13 @@
3636
"dev": "dumi dev",
3737
"docs:build": "dumi build",
3838
"docs:build-analyze": "ANALYZE=1 dumi build",
39+
"docs:dev": "dumi dev",
3940
"doctor": "father doctor",
4041
"lint": "eslint \"{src,tests}/**/*.{js,jsx,ts,tsx}\" --fix",
4142
"lint:md": "remark . --quiet --frail --output",
4243
"lint:style": "stylelint \"{src,tests}/**/*.{js,jsx,ts,tsx}\" --fix",
4344
"prepare": "husky && npm run setup",
44-
"prepublishOnly": "npm run build",
45+
"prepublishOnly": "father doctor && npm run build",
4546
"prettier": "prettier -c --write --no-error-on-unmatched-pattern \"**/**\"",
4647
"pull": "git pull",
4748
"release": "semantic-release",
@@ -90,7 +91,7 @@
9091
"consola": "^3.2.3",
9192
"cross-env": "^7.0.3",
9293
"dumi": "^2.4.14",
93-
"dumi-theme-lobehub": "^1.9.2",
94+
"dumi-theme-lobehub": "^1.10.4",
9495
"eslint": "^8.57.1",
9596
"father": "^4.5.1",
9697
"glob": "^11.0.0",

public/robots.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
User-Agent: *
2+
Allow: /
3+
4+
Host: https://icons.lobehub.com
5+
Sitemap: https://icons.lobehub.com/sitemap.xml

src/components/Dashboard/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const Dashboard = memo(() => {
6464
}}
6565
/>
6666
</Flexbox>
67-
<Grid maxItemWidth={200} rows={8}>
67+
<Grid maxItemWidth={160} rows={5}>
6868
{iconsGroup.map(([key, Icon]: [string, any]) => {
6969
const IconRender = isMono ? Icon : Icon.Color || Icon;
7070
return (

0 commit comments

Comments
 (0)