Skip to content

Commit

Permalink
πŸ’„ style: Update og
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Nov 24, 2024
1 parent b2c1d73 commit 9586724
Show file tree
Hide file tree
Showing 21 changed files with 105 additions and 71 deletions.
80 changes: 30 additions & 50 deletions .dumirc.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
import { defineConfig } from 'dumi';
import { SiteThemeConfig } from 'dumi-theme-lobehub';
import { INavItem } from 'dumi/dist/client/theme-api/types';

import { description, homepage, name } from './package.json';
import { description, homepage } from './package.json';

const isWin = process.platform === 'win32';

const themeConfig = {
const nav: INavItem[] = [
{ link: '/components/readme-hero', title: 'Generator' },
{ link: 'https://simpleicons.org/', mode: 'override', title: 'Icons' },
{ link: '/changelog', title: 'Changelog' },
];

const themeConfig: SiteThemeConfig = {
actions: [
{
link: homepage,
Expand All @@ -17,65 +25,37 @@ const themeConfig = {
type: 'primary',
},
],
analytics: {
plausible: {
domain: 'readme-wizard.lobehub.com',
scriptBaseUrl: 'https://plausible.lobehub-inc.cn',
},
},
apiHeader: {
docUrl: false,
docUrl: `{github}/tree/master/src/{atomId}/index.md`,
match: ['/components'],
pkg: name,
sourceUrl: false,
sourceUrl: `{github}/tree/master/src/{atomId}/index.tsx`,
type: 'doc',
},
description: description,
docStyle: 'pure',
footer: 'Made with 🀯 by LobeHub',
footerConfig: {
resources: {
items: [
{
description: 'Markdown processor ',
openExternal: true,
title: 'Remark',
url: 'https://github.com/remarkjs',
},
{
description: 'Concise badges',
openExternal: true,
title: 'Shields',
url: 'https://shields.io/',
},
{
description: 'Icons for popular brands',
openExternal: true,
title: 'Simple Icons',
url: 'https://simpleicons.org',
},
{
description: 'Dynamically stats for github',
openExternal: true,
title: 'Readme Stats',
url: 'https://github.com/anuraghazra/github-readme-stats',
},
{
description: 'List of GitHub badges',
openExternal: true,
title: 'Awesome Badges',
url: 'https://github.com/Envoy-VC/awesome-badges',
},
],
title: 'Resources',
},
},
description,
giscus: {
category: 'Ideas',
categoryId: 'DIC_kwDOJloKoM4CXsCu',
repo: 'lobehub/lobe-readme-wizard',
repoId: 'R_kgDOKTF8TQ',
},
metadata: {
openGraph: {
image:
'https://repository-images.githubusercontent.com/691108941/a66e25b3-1481-429c-b565-419bfb859ecb',
},
},
name: 'ReadmeWizard',
nav: [
{ link: '/components/readme-hero', title: 'Generator' },
{ link: 'https://simpleicons.org/', mode: 'override', title: 'Icons' },
{ link: '/changelog', title: 'Changelog' },
],
nav,
prefersColor: {
default: 'dark',
switch: false,
},
socialLinks: {
discord: 'https://discord.gg/AYFPHvv2jT',
github: homepage,
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
]
},
"dependencies": {
"@babel/runtime": "^7.25.6",
"@babel/runtime": "^7.26.0",
"@vercel/og": "0.5.18",
"dotenv": "^16.4.5",
"fast-deep-equal": "^3.1.3",
Expand All @@ -65,8 +65,8 @@
"polished": "^4.3.1",
"query-string": "^8.2.0",
"react-markdown": "^8.0.7",
"react-syntax-highlighter": "^15.5.0",
"rehype-highlight": "^7.0.0",
"react-syntax-highlighter": "^15.6.1",
"rehype-highlight": "^7.0.1",
"rehype-raw": "^7.0.0",
"remark-gfm": "^3.0.1",
"remark-slug": "^7.0.1",
Expand All @@ -84,17 +84,17 @@
"@lobehub/lint": "latest",
"@testing-library/react": "^14.3.1",
"@types/lodash-es": "^4.17.12",
"@types/react": "^18.3.8",
"@types/react-dom": "^18.3.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitest/coverage-v8": "~1.2.2",
"babel-plugin-antd-style": "^1.0.4",
"commitlint": "^18.6.1",
"concurrently": "^8.2.2",
"cross-env": "^7.0.3",
"dumi": "^2.2.17",
"dumi-theme-lobehub": "^1.8.1",
"dumi": "^2.4.14",
"dumi-theme-lobehub": "^1.9.2",
"eslint": "^8.57.1",
"father": "^4.3.1",
"father": "^4.5.1",
"husky": "^9.1.7",
"jsdom": "^23.2.0",
"lint-staged": "^15.2.10",
Expand All @@ -103,7 +103,7 @@
"remark-cli": "^11.0.0",
"semantic-release": "^21.1.2",
"stylelint": "^15.11.0",
"typescript": "^5.6.2",
"typescript": "^5.7.2",
"vitest": "~1.2.2"
},
"peerDependencies": {
Expand Down
3 changes: 3 additions & 0 deletions src/ReadmeContributing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ nav: components
group: readme
title: Contributing
order: 6
description: Contributing markdown generator
---

## Editor

<code src="./index.tsx" inline></code>
3 changes: 3 additions & 0 deletions src/ReadmeCredits/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ nav: components
group: readme
title: Credits
order: 6
description: Credits markdown generator
---

## Editor

<code src="./index.tsx" inline></code>
3 changes: 3 additions & 0 deletions src/ReadmeDevelopment/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ nav: components
group: readme
title: Development
order: 4
description: Development markdown generator
---

## Editor

<code src="./index.tsx" inline></code>
3 changes: 3 additions & 0 deletions src/ReadmeFeatures/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ nav: components
group: readme
title: Features
order: 2
description: Features markdown generator
---

## Editor

<code src="./index.tsx" inline></code>
3 changes: 3 additions & 0 deletions src/ReadmeHero/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ nav: components
group: readme
title: Hero
order: 1
description: Hero markdown generator
---

## Editor

<code src="./index.tsx" inline></code>
3 changes: 3 additions & 0 deletions src/ReadmeInstallation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ nav: components
group: readme
title: Installation
order: 2
description: Installation markdown generator
---

## Editor

<code src="./index.tsx" inline></code>
3 changes: 3 additions & 0 deletions src/ReadmeLicense/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ nav: components
group: readme
title: License
order: 7
description: License markdown generator
---

## Editor

<code src="./index.tsx" inline></code>
3 changes: 3 additions & 0 deletions src/ShieldShare/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ nav: components
group: shields
title: Share
order: 7
description: Share shields generator
---

## Editor

<code src="./index.tsx" inline></code>
3 changes: 3 additions & 0 deletions src/ShieldsBilibili/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ nav: components
group: shields
title: Bilibili
order: 6
description: Bilibili shields generator
---

## Editor

<code src="./index.tsx" inline></code>
7 changes: 5 additions & 2 deletions src/ShieldsCustom/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ nav: components
group: shields
title: Custom
order: 1
description: Shields generator
---

## Custom Single
## Editor

### Custom Single

<code src="./Single.tsx" inline></code>

## Custom Double
### Custom Double

<code src="./Double.tsx" inline></code>
5 changes: 4 additions & 1 deletion src/ShieldsDiscord/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ nav: components
group: shields
title: Discord
order: 5
description: Discord shields generator
---

## Generator [πŸ”—](https://vimeo.com/364220040)
## Editor

<https://vimeo.com/364220040>

<code src="./index.tsx" inline></code>
3 changes: 3 additions & 0 deletions src/ShieldsDocker/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ nav: components
group: shields
title: Docker
order: 4
description: Docker shields generator
---

## Editor

<code src="./index.tsx" inline></code>
15 changes: 9 additions & 6 deletions src/ShieldsGithub/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,31 @@ nav: components
group: shields
title: Github
order: 2
description: Github shields generator
---

## Social
## Editor

### Social

<code src="./Social.tsx" inline></code>

## Release
### Release

<code src="./Release.tsx" inline></code>

## Action
### Action

<code src="./Action.tsx" inline></code>

## Star History
### Star History

<code src="./StarHistory.tsx" inline></code>

## Codespace
### Codespace

<code src="./Codespace.tsx" inline></code>

## Contributors
### Contributors

<code src="./Contributors.tsx" inline></code>
3 changes: 3 additions & 0 deletions src/ShieldsNpm/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ nav: components
group: shields
title: NPM
order: 3
description: NPM shields generator
---

## Editor

<code src="./index.tsx" inline></code>
3 changes: 3 additions & 0 deletions src/ShieldsSocial/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ nav: components
group: shields
title: Social
order: 8
description: Social shields generator
---

## Editor

<code src="./index.tsx" inline></code>
7 changes: 5 additions & 2 deletions src/ShieldsVercel/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ nav: components
group: shields
title: Vercel
order: 4
description: Vercel shields generator
---

## Deploy [πŸ”—](https://vercel.com/docs/deployments/deploy-button)
## Editor

<https://vercel.com/docs/deployments/deploy-button>

<code src="./Deploy.tsx" inline></code>

## Website
### Website

<code src="./Website.tsx" inline></code>
3 changes: 3 additions & 0 deletions src/ShieldsWebsite/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ nav: components
group: shields
title: Website
order: 1
description: Website shields generator
---

## Editor

<code src="./index.tsx" inline></code>
3 changes: 3 additions & 0 deletions src/Sponsor/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ nav: components
group: sponsor
title: SponsorKit
order: 1
description: Sponsor shields generator
---

## Editor

<code src="./demos/index.tsx" nopadding></code>
2 changes: 1 addition & 1 deletion src/components/Highlight/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const Highlight = memo<HighlighterProps>(({ children, ...props }) => {
const { data, isLoading } = useSWR(children, () => remarkFormat(children));

return (
<Highlighter {...props} language={'md'} type={'pure'}>
<Highlighter {...props} language={'md'} type={'block'}>
{isLoading ? '' : String(data)}
</Highlighter>
);
Expand Down

0 comments on commit 9586724

Please sign in to comment.