Skip to content

Commit

Permalink
blog mdx and removing not used libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladyslav Zuiev committed Aug 29, 2021
1 parent 1867d98 commit 89b75a2
Show file tree
Hide file tree
Showing 30 changed files with 532 additions and 3,664 deletions.
19 changes: 19 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"base_url": "https://wutali-nextjs-netlify-blog.netlify.app",
"site_title": "Next.js Netlify Blog",
"site_description": "Next.js blog template for Netlify",
"site_keywords": [
{
"keyword": "Next.js"
},
{
"keyword": "Netlify"
},
{
"keyword": "React"
}
],
"posts_per_page": 5,
"twitter_account": "@my-account",
"github_account": "wutali"
}
11 changes: 7 additions & 4 deletions content/home.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
title: Awesome kitties
date: 2019-03-17T19:31:20.591Z
---

Welcome to my awesome page about cats of the internet.
**Hi, I'm a component**. Apparently, this sentence will be made bold and italic
This page is built with NextJS, and content is managed in Netlify CMS
> Welcome to my awesome page about cats of the internet.
>
> ![hmmm](img/thinking-face_1f914.png)
>
>
> **Hi, I'm a component**. Apparently, this sentence will be made **bold** and *italic*
> This page is built with `NextJS`, and content is managed in `Netlify CMS`
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: A blog post with picture of dog chicken tica massala
date: 2019-09-06T08:28:44.549Z
thumbnail: img/e88gsezvuacrcgj.jpeg
thumbnail: /img/e88gsezvuacrcgj.jpeg
---

## Unfortunately, that's it.
Expand Down
File renamed without changes.
7 changes: 7 additions & 0 deletions content/posts/this_is_test_blog.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: 'This is test blog '
date: 2021-08-29T22:13:03.115Z
thumbnail: /img/puppy-and-adult-dog.jpg
---

**m Ipsum** is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
File renamed without changes.
15 changes: 0 additions & 15 deletions data/about.ts

This file was deleted.

63 changes: 1 addition & 62 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,69 +1,8 @@
const withPlugins = require('next-compose-plugins');
const withPWA = require('next-pwa');
const optimizedImages = require('next-optimized-images');
const fs = require('fs');
const blogPostsFolder = './content/blogPosts';

const getPathsForPosts = () => {
return fs
.readdirSync(blogPostsFolder)
.map((blogName) => {
const trimmedName = blogName.substring(0, blogName.length - 3);
return {
[`/blog/post/${trimmedName}`]: {
page: '/blog/post/[slug]',
query: {
slug: trimmedName,
},
},
};
})
.reduce((acc, curr) => {
return { ...acc, ...curr };
}, {});
};

/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
/* config options here */
webpack: (config) => {
config.module.rules.push({
test: /\.md$/,
use: 'frontmatter-markdown-loader',
});
return config;
},
exportPathMap: async function (defaultPathMap) {
return {
...defaultPathMap,
...getPathsForPosts(),
};
},
};

module.exports = withPlugins(
[
[
[
optimizedImages,
{
optimizeImagesInDev: true,
responsive: {
adapter: require('responsive-loader/sharp'),
},
},
],
[
withPWA,
{
pwa: {
dest: 'public',
},
},
],
],
],
nextConfig
);
module.exports = nextConfig;
Loading

0 comments on commit 89b75a2

Please sign in to comment.