Skip to content

Commit

Permalink
feat: v4.45.0
Browse files Browse the repository at this point in the history
  • Loading branch information
surmon-china committed Sep 11, 2024
1 parent 58eda67 commit 5f72e78
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

All notable changes to this project will be documented in this file.

### v4.45.0 (2024-09-12)

**Feature**

- Disabled adsense on mobile device.
- Remove `replayIntegration` from Sentry.
- Improve `manualChunks` in rollup.
- Add `/answers` page.

### v4.31.0 (2023-11-22)

**Feature**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "surmon.me",
"version": "4.44.7",
"version": "4.45.0",
"description": "Surmon.me blog",
"author": "Surmon",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/csr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ app.use(gtag, {
})
// enable adsense on desktop only
if (!globalState.userAgent.isMobile) {
app.use(adsense, { id: IDENTITIES.GOOGLE_ADSENSE_CLIENT_ID, enabledAutoAd: true })
app.use(adsense, { id: IDENTITIES.GOOGLE_ADSENSE_CLIENT_ID, enabledAutoAd: false })
}

// init: store (from SSR context or fetch)
Expand Down
4 changes: 3 additions & 1 deletion src/transforms/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const trimHTML = (html: string) => html.replace(/\s+/g, ' ').replace(/\n/g, ' ')
interface RendererCreatorOptions {
sanitize: boolean
lazyLoadImage: boolean
codeLineNumbers: boolean
headingIdentifierGetter(level: number, text: string): { anchor?: string; id?: string }
imageSourceGetter(src: string): string | { src: string; sources: Array<{ srcset: string; type: string }> }
}
Expand Down Expand Up @@ -233,7 +234,8 @@ export const markdownToHTML = (markdown: string, options?: MarkdownRenderOption)
const renderOptions: Partial<RendererCreatorOptions> = {
...options,
sanitize: options?.sanitize ?? false,
lazyLoadImage: options?.lazyLoadImage ?? true
lazyLoadImage: options?.lazyLoadImage ?? true,
codeLineNumbers: options?.codeLineNumbers ?? true
}

return marked.parse(markdown, { renderer: createRenderer(renderOptions) }) as string
Expand Down

0 comments on commit 5f72e78

Please sign in to comment.