So much styling
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import type { GetServerSideProps, NextPage } from "next";
|
||||
import Layout from "../../../components/Blog/Layout";
|
||||
import ContentPage from "../../../components/Blog/ContentPage";
|
||||
import { generateContent, getContentList } from "../../../lib/content/generateBackend";
|
||||
import { generateContent, getContentList, prepareDOM } from "../../../lib/content/generateBackend";
|
||||
import type { ContentList, DiaryRender, Diary } from "../../../lib/content/types";
|
||||
|
||||
const DiaryMain: NextPage<{ content: DiaryRender }> = ({ content }) => {
|
||||
@ -19,12 +19,13 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
|
||||
if (!contentEntry) return { notFound: true };
|
||||
|
||||
const contentHtml = await generateContent(contentEntry);
|
||||
const contentPrepared = prepareDOM(contentHtml);
|
||||
|
||||
return {
|
||||
props: {
|
||||
content: {
|
||||
...contentEntry,
|
||||
html: contentHtml,
|
||||
html: contentPrepared,
|
||||
pageSelected: 0
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import type { GetServerSideProps, NextPage } from "next";
|
||||
import ContentPage from "../../../../components/Blog/ContentPage";
|
||||
import Layout from "../../../../components/Blog/Layout";
|
||||
import { generateContent, getContentList, generateHighlightedDOM } from "../../../../lib/content/generateBackend";
|
||||
import { generateContent, getContentList, prepareDOM } from "../../../../lib/content/generateBackend";
|
||||
import type { ContentList, Diary, DiaryRender } from "../../../../lib/content/types";
|
||||
|
||||
const DiaryMain: NextPage<{ content: DiaryRender }> = ({ content }) => {
|
||||
@ -19,13 +19,13 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
|
||||
if (!contentEntry || !page || typeof page !== "string") return { notFound: true };
|
||||
|
||||
const contentHtml = await generateContent(contentEntry, Number.parseInt(page));
|
||||
const contentHighlighted = generateHighlightedDOM(contentHtml);
|
||||
const contentPrepared = prepareDOM(contentHtml);
|
||||
|
||||
return {
|
||||
props: {
|
||||
content: {
|
||||
...contentEntry,
|
||||
html: contentHighlighted,
|
||||
html: contentPrepared,
|
||||
pageSelected: Number.parseInt(page)
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import type { GetServerSideProps, NextPage } from "next";
|
||||
import ContentPage from "../../../components/Blog/ContentPage";
|
||||
import Layout from "../../../components/Blog/Layout";
|
||||
import { generateContent, getContentList } from "../../../lib/content/generateBackend";
|
||||
import { generateContent, getContentList, prepareDOM } from "../../../lib/content/generateBackend";
|
||||
import type { ContentList, ProjectRender } from "../../../lib/content/types";
|
||||
|
||||
const Post: NextPage<{ content: ProjectRender }> = ({ content }) => {
|
||||
@ -20,6 +20,7 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
|
||||
if (!contentEntry) return { notFound: true };
|
||||
|
||||
const contentHtml = await generateContent(contentEntry);
|
||||
const contentPrepared = prepareDOM(contentHtml);
|
||||
|
||||
return {
|
||||
props: {
|
||||
@ -27,7 +28,7 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
|
||||
more: contentEntry.more || null,
|
||||
repo: contentEntry.repo || null,
|
||||
title: contentEntry.title,
|
||||
html: contentHtml,
|
||||
html: contentPrepared,
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user