Skip to content

Commit 151928e

Browse files
author
tkokhing
committed
re-org yaml, posts pulling processes
1 parent 212cc76 commit 151928e

8 files changed

Lines changed: 18 additions & 14 deletions

File tree

.github/workflows/nextjs.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ jobs:
6363
id: move_topics_post
6464
run: |
6565
echo "Present working directory---->: $(pwd)"
66-
mkdir _topics
67-
mv ./temp_topic/_topics/*.mdx ./_topics
66+
mkdir -p _topic_post/_topics
67+
mv ./temp_topic/_topics/*.mdx ./_topic_post/_topics
6868
rm -rf ./temp_topic
6969
echo "ls -lha ---->:"
7070
ls -lha .
@@ -73,13 +73,15 @@ jobs:
7373
with:
7474
repository: tkokhing/blog_post
7575
token: ${{ secrets.PULL_POST_TOKEN }}
76-
path: _posts
76+
path: temp_blog
7777
- name: Move [_posts] to correct level
7878
id: move_blog_post
7979
run: |
80-
mv ./_posts/_posts/*.mdx _posts
81-
rm ./_posts/README.md
82-
find ./_posts -mindepth 1 -depth -type d ! -name "*.mdx" -exec rm -r {} +
80+
mkdir -p _blog_post/_blogs
81+
mv ./temp_blog/_blogs/*.mdx ./_blog_post/_blogs
82+
rm -rf ./temp_blog
83+
echo "ls -lha ---->:"
84+
ls -lha .
8385
- name: Checkout [linux_post] private repo
8486
uses: actions/checkout@v4
8587
with:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ src/lib/_data_exporter/
1919
/.next/
2020
/out/
2121
/dist/
22+
/_blog_post/_blogs
2223
/_posts
2324
/_frontier
25+
/_topic_post/_topics
2426
/_topics
2527
/_linux
2628
/_mdxposts

src/app/blog/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { HeroPost } from "@/app/_components/post_gen/hero-post";
55
import { MoreStories } from "@/app/_components/post_gen/more-stories";
66

77
export default function Index() {
8-
const allPosts = getAllPosts("_posts");
8+
const allPosts = getAllPosts("_blog_post/_blogs");
99
const heroPost = allPosts[0];
1010
const morePosts = allPosts.slice(1);
1111

src/app/blog/posts/[slug]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// [tkokhing/blog_post/_posts] MDX_FOLDER
1+
// [tkokhing/blog_post/_blog_post/_blogs] MDX_FOLDER
22
import { Metadata } from "next";
33
import { notFound } from "next/navigation";
44
import { getPostBySlug } from "@/lib/api";
@@ -11,7 +11,7 @@ import { ToggleFrame } from "@/app/_components/preference/toggle-frame";
1111
import { FrontierData } from "@/app/_components/preference/data-exporter";
1212
import { PostListConcise } from "@/app/_components/post_gen/post-list-concise";
1313

14-
const MDX_FOLDER = "_posts";
14+
const MDX_FOLDER = "_blog_post/_blogs";
1515

1616
type Params = {
1717
params: Promise<{

src/app/blog/posts/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
import { PostListConcise } from "@/app/_components/post_gen/post-list-concise";
33

44
export default function BlogPostListPage() {
5-
return <PostListConcise dir={"_posts"} />
5+
return <PostListConcise dir={"_blog_post/_blogs"} />
66
}

src/app/topics/AtoZ/[slug]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// [tkokhing/topic_post/_topics] MDX_FOLDER
1+
// [tkokhing/topic_post/_topic_post/_topics] MDX_FOLDER
22
import { Metadata } from "next";
33
import { notFound } from "next/navigation";
44
import Container from "@/app/_components/preference/container";
@@ -8,7 +8,7 @@ import { getPostBySlug } from "@/lib/api";
88
import { generatePageMetadata } from "@/lib/generatePageMetadata";
99
import { generatePageStaticParams } from "@/lib/generatePageStaticParams";
1010

11-
const MDX_FOLDER = "_topics";
11+
const MDX_FOLDER = "_topic_post/_topics";
1212

1313
type Params = {
1414
params: Promise<{

src/app/topics/AtoZ/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { PostListConcise } from "@/app/_components/post_gen/post-list-concise";
22

33
export default function AtoZIndexPage() {
4-
return <PostListConcise dir={"_topics"} />
4+
return <PostListConcise dir={"_topic_post/_topics"} />
55
}

src/app/topics/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { HeroPost } from "@/app/_components/post_gen/hero-post";
44
import { MoreStories } from "@/app/_components/post_gen/more-stories";
55

66
export default function Index() {
7-
const allPosts = getAllPosts("_topics");
7+
const allPosts = getAllPosts("_topic_post/_topics");
88
const heroPost = allPosts[0];
99
const morePosts = allPosts.slice(1);
1010
return (

0 commit comments

Comments
 (0)