Skip to content

Commit

Permalink
refactored folders
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelos Vatikiotis committed Jul 1, 2024
1 parent 4531b43 commit 93cb296
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 5 deletions.
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions src/markdown-pages/home.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
### **Streamline Your Software Engineering Interview Preparation with InterviewRunbook.com**

Preparing for software engineering jobs is a challenging and often overwhelming process that engineers may face multiple
times throughout their careers. To support and simplify this journey, InterviewRunbook.com offers a comprehensive
platform designed to help engineers systematically document their progress and experiences.

Our platform features articles written by seasoned professionals, utilizing Markdown files to create high-quality
content. This not only ensures consistency and readability but also enables the material to be easily hosted on GitHub
for free, providing a valuable resource accessible to everyone.

**Why Choose InterviewRunbook.com?**

- **Structured Progress Tracking:** Easily document your interview preparation journey, from studying algorithms to
practicing coding problems, all in a structured and organized manner.
- **Community-Generated Content:** Benefit from articles and tutorials created by experienced software engineers who
have navigated the interview process successfully.
- **Open Source and Free:** All content is hosted on GitHub, making it freely available to the community. Contribute
your own experiences and learn from others.
- **Markdown Simplicity:** Using Markdown files ensures your notes and articles are easy to write, maintain, and read,
allowing you
5 changes: 3 additions & 2 deletions src/pages/articles/[pid].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@ export default function Article(props:any) {
}

export async function getStaticProps({params}:{params:any}) {
const article = await fs.readFile("./src/articles/"+params.pid, "utf8");
const article = await fs.readFile("./src/markdown-pages/articles/"+params.pid, "utf8");
console.log(article)
return {props: {article}};

}

export async function getStaticPaths() {
let paths = (await fs.readdir("./src/articles")).map(p => "/articles/"+p)
let paths = (await fs.readdir("./src/markdown-pages/articles")).map(p => "/articles/"+p)
console.log("psths to render:", paths);
return { paths, fallback: true }

}


Expand Down
2 changes: 1 addition & 1 deletion src/pages/articles/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function ArticlesList(props: any) {
// It won't be called on client-side, so you can even do
// direct database queries. See the "Technical details" section.
export async function getStaticProps() {
return {props: {articles: await readDirectory("./src/articles")}};
return {props: {articles: await readDirectory("./src/markdown-pages/articles")}};
}

async function readDirectory(path: any) {
Expand Down
15 changes: 13 additions & 2 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
export default function Home() {
return <h1>Home page</h1>;
import Markdown from 'react-markdown'
import { promises as fs } from 'fs';

export default function Home(props:any) {
return <Markdown>{props.article}</Markdown>
}


export async function getStaticProps({params}:{params:any}) {
const article = await fs.readFile("./src/markdown-pages/home.md", "utf8");
console.log(article)
return {props: {article}};

}

0 comments on commit 93cb296

Please sign in to comment.