Skip to content

Commit

Permalink
fix: blog code highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanshuyou committed Sep 27, 2024
1 parent 3083e05 commit 26a20c2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/docs
Submodule docs updated 209 files
4 changes: 2 additions & 2 deletions src/pages/blog/[id].jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useMemo, useEffect, useRef } from 'react';
import React, { useMemo, useRef } from 'react';
import Head from 'next/head';
import { useTranslation } from 'react-i18next';
import Layout from '../../components/layout/commonLayout';
Expand All @@ -14,7 +14,7 @@ import BlogAnchorSection from '../../parts/blogs/blogAnchors';
import pageClasses from '../../styles/responsive.module.less';
import { ABSOLUTE_BASE_URL } from '@/consts';
import { useCopyCode } from '../../hooks/enhanceCodeBlock';
import { CUSTOM_H1_TAG } from '@/consts';
import 'highlight.js/styles/atom-one-light.css';

export default function Template(props) {
const {
Expand Down
6 changes: 4 additions & 2 deletions src/styles/blogDetail.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
flex-direction: column;
align-items: center;



.authorDate {
color: @color-grey-02;
font-size: 18px;
Expand Down Expand Up @@ -73,6 +71,10 @@
margin: 0 auto 60px;
}

pre {
border: 1px solid @color-grey-04;
}

code[class^='language-'] {
display: block;
}
Expand Down

0 comments on commit 26a20c2

Please sign in to comment.