This commit is contained in:
parent
4c4411843a
commit
b0d6d74853
|
|
@ -11,7 +11,7 @@ import rehypeSlug from "rehype-slug";
|
||||||
import remarkGfm from "remark-gfm";
|
import remarkGfm from "remark-gfm";
|
||||||
import { BUNDLED_LANGUAGES, type HighlighterOptions, getHighlighter } from "shiki";
|
import { BUNDLED_LANGUAGES, type HighlighterOptions, getHighlighter } from "shiki";
|
||||||
import gitHubLight from "shiki/themes/github-light.json";
|
import gitHubLight from "shiki/themes/github-light.json";
|
||||||
import service from "./http/service";
|
import { getService } from "./http/service";
|
||||||
import { ArticleData, QAData } from "@/components/article/article";
|
import { ArticleData, QAData } from "@/components/article/article";
|
||||||
|
|
||||||
export const BLOG_PATH = path.join(process.cwd(), "content", "blog");
|
export const BLOG_PATH = path.join(process.cwd(), "content", "blog");
|
||||||
|
|
@ -253,6 +253,7 @@ export const getPostContent = async (language: string, slug: string): Promise<AI
|
||||||
const PageSize = 1
|
const PageSize = 1
|
||||||
|
|
||||||
|
|
||||||
|
const service = await getService();
|
||||||
let data: ArticleData = await service.post('/api/v1/news/list', {
|
let data: ArticleData = await service.post('/api/v1/news/list', {
|
||||||
"id": Number(slug),
|
"id": Number(slug),
|
||||||
// "tag": "", // #Blockchain
|
// "tag": "", // #Blockchain
|
||||||
|
|
@ -340,6 +341,7 @@ export const getQAContent = async (language: string, slug: string): Promise<AIPo
|
||||||
// const rawMdx = await raw({ contentPath: BLOG_PATH, filepath: filepath });
|
// const rawMdx = await raw({ contentPath: BLOG_PATH, filepath: filepath });
|
||||||
|
|
||||||
const PageSize = 1
|
const PageSize = 1
|
||||||
|
const service = await getService();
|
||||||
let data: QAData = await service.post('/api/v1/qa/list', {
|
let data: QAData = await service.post('/api/v1/qa/list', {
|
||||||
"id": Number(slug),
|
"id": Number(slug),
|
||||||
// "tag": "", // #Blockchain
|
// "tag": "", // #Blockchain
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import rehypeSlug from "rehype-slug";
|
||||||
import remarkGfm from "remark-gfm";
|
import remarkGfm from "remark-gfm";
|
||||||
import { BUNDLED_LANGUAGES, type HighlighterOptions, getHighlighter } from "shiki";
|
import { BUNDLED_LANGUAGES, type HighlighterOptions, getHighlighter } from "shiki";
|
||||||
import gitHubLight from "shiki/themes/github-light.json";
|
import gitHubLight from "shiki/themes/github-light.json";
|
||||||
import service from "./http/service";
|
import { getService } from "./http/service";
|
||||||
import { ArticleData, QAData } from "@/components/article/article";
|
import { ArticleData, QAData } from "@/components/article/article";
|
||||||
|
|
||||||
export const BLOG_PATH = path.join(process.cwd(), "content", "blog");
|
export const BLOG_PATH = path.join(process.cwd(), "content", "blog");
|
||||||
|
|
@ -248,7 +248,7 @@ export const getPostContent = async (language: string, slug: string): Promise<AI
|
||||||
|
|
||||||
const PageSize = 1
|
const PageSize = 1
|
||||||
|
|
||||||
|
const service = await getService();
|
||||||
let data: ArticleData = await service.post('/api/v1/news/list', {
|
let data: ArticleData = await service.post('/api/v1/news/list', {
|
||||||
"id": Number(slug),
|
"id": Number(slug),
|
||||||
// "tag": "", // #Blockchain
|
// "tag": "", // #Blockchain
|
||||||
|
|
@ -332,6 +332,7 @@ export const getQAContent = async (language: string, slug: string): Promise<AIPo
|
||||||
// const rawMdx = await raw({ contentPath: BLOG_PATH, filepath: filepath });
|
// const rawMdx = await raw({ contentPath: BLOG_PATH, filepath: filepath });
|
||||||
|
|
||||||
const PageSize = 1
|
const PageSize = 1
|
||||||
|
const service = await getService();
|
||||||
let data: QAData = await service.post('/api/v1/qa/list', {
|
let data: QAData = await service.post('/api/v1/qa/list', {
|
||||||
"id": Number(slug),
|
"id": Number(slug),
|
||||||
// "tag": "", // #Blockchain
|
// "tag": "", // #Blockchain
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import rehypeSlug from "rehype-slug";
|
||||||
import remarkGfm from "remark-gfm";
|
import remarkGfm from "remark-gfm";
|
||||||
import { BUNDLED_LANGUAGES, type HighlighterOptions, getHighlighter } from "shiki";
|
import { BUNDLED_LANGUAGES, type HighlighterOptions, getHighlighter } from "shiki";
|
||||||
import gitHubLight from "shiki/themes/github-light.json";
|
import gitHubLight from "shiki/themes/github-light.json";
|
||||||
import service from "./http/service";
|
import { getService } from "./http/service";
|
||||||
import { ArticleData, QAData } from "@/components/article/article";
|
import { ArticleData, QAData } from "@/components/article/article";
|
||||||
|
|
||||||
export const BLOG_PATH = path.join(process.cwd(), "content", "blog");
|
export const BLOG_PATH = path.join(process.cwd(), "content", "blog");
|
||||||
|
|
@ -248,7 +248,7 @@ export const getPostContent = async (language: string, slug: string): Promise<AI
|
||||||
|
|
||||||
const PageSize = 1
|
const PageSize = 1
|
||||||
|
|
||||||
|
const service = await getService();
|
||||||
let data: ArticleData = await service.post('/api/v1/news/list', {
|
let data: ArticleData = await service.post('/api/v1/news/list', {
|
||||||
"id": Number(slug),
|
"id": Number(slug),
|
||||||
// "tag": "", // #Blockchain
|
// "tag": "", // #Blockchain
|
||||||
|
|
@ -332,6 +332,7 @@ export const getQAContent = async (language: string, slug: string): Promise<AIPo
|
||||||
// const rawMdx = await raw({ contentPath: BLOG_PATH, filepath: filepath });
|
// const rawMdx = await raw({ contentPath: BLOG_PATH, filepath: filepath });
|
||||||
|
|
||||||
const PageSize = 1
|
const PageSize = 1
|
||||||
|
const service = await getService();
|
||||||
let data: QAData = await service.post('/api/v1/qa/list', {
|
let data: QAData = await service.post('/api/v1/qa/list', {
|
||||||
"id": Number(slug),
|
"id": Number(slug),
|
||||||
// "tag": "", // #Blockchain
|
// "tag": "", // #Blockchain
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue