Skip to content

Commit 65da1b3

Browse files
Updated the workspace with old blog setup
1 parent 544ace1 commit 65da1b3

File tree

29 files changed

+71
-218
lines changed

29 files changed

+71
-218
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ VITE_SESSION_KEY=
1616
VITE_TWITTER_API_KEY=
1717
VITE_TWITTER_TWEETS_ENDPOINT=https://api.twitter.com/2/tweets
1818
VITE_TWITTER_SEARCH_URL=https://mobile.twitter.com/search
19-
VITE_GITHUB_BLOG_EDIT_URL=https://github.com/navneetsharmaui/sveltekit-blog/tree/main/blogs
19+
VITE_GITHUB_BLOG_EDIT_URL=https://github.com/navneetsharmaui/sveltekit-blog/tree/main/contents/blogs

contents/blogs/.gitkeep

Whitespace-only changes.

contents/blogs/third-blog.md renamed to contents/blogs/a-second-post.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
2-
title: "Third blog based on the sveltekit"
3-
slug: "third-blog"
2+
title: "A second blog post"
3+
slug: "a-second-post"
44
description: "Fusce ac lorem sit amet metus vestibulum dapibus ut at mauris. Etiam ut pulvinar nibh."
55
author: "Navneet Sharma"
66
date: "2021-09-06"
7+
banner: "/images/banner.jpg"
78
published: true
89
tags:
910
- Svelte

contents/blogs/first-blog.md renamed to contents/blogs/welcome-to-my-blog.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
title: "First blog based on the sveltekit"
3-
slug: "first-blog"
2+
title: "Welcome to my blog!"
3+
slug: "welcome-to-my-blog"
44
description: "Fusce ac lorem sit amet metus vestibulum dapibus ut at mauris. Etiam ut pulvinar nibh."
55
author: "Navneet Sharma"
6-
date: "2021-09-01"
6+
date: "2021-09-06"
7+
banner: "/images/banner.jpg"
78
published: true
89
tags:
9-
- Svelte
10+
- React
1011
- JavaScript
11-
- Typescript
1212
- web development
1313
- Programming
1414
---

contents/blogs/second-blog.md renamed to contents/blogs/yet-another-blog-post.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
title: "Second blog based on the sveltekit"
3-
slug: "second-blog"
2+
title: "Yet another article"
3+
slug: "yet-another-blog-post"
44
description: "Fusce ac lorem sit amet metus vestibulum dapibus ut at mauris. Etiam ut pulvinar nibh."
55
author: "Navneet Sharma"
6-
date: "2021-09-03"
6+
date: "2021-09-06"
7+
banner: "/images/banner.jpg"
78
published: true
89
tags:
9-
- Svelte
10-
- JavaScript
10+
- Angular
1111
- Typescript
1212
- web development
1313
- Programming

contents/snippets/.gitkeep

Whitespace-only changes.

package.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"build:sveltekit": "cross-env-shell svelte-kit build",
6969
"build": "run-s remove-css build:sitemap:prod build:env:prod build:scss build:postcss build:postcss:taildwindcss build:sveltekit build:env:local",
7070
"build:verbose:sveltekit": "cross-env-shell svelte-kit build --verbose",
71-
"build:verbose": "run-s check-env remove-css build:sitemap:prod build:env:prod build:scss build:postcss build:postcss:taildwindcss build:verbose:sveltekit build:env:local",
71+
"build:verbose": "run-s build:scss build:postcss build:postcss:taildwindcss build:verbose:sveltekit",
7272
"build:static": "cross-env ADAPTER=static OPTIONS='{}' npm run build",
7373
"build:node": "cross-env ADAPTER=node OPTIONS='{}' npm run build",
7474
"build:netlify": "cross-env ADAPTER=netlify OPTIONS='{}' npm run build",
@@ -119,12 +119,6 @@
119119
"storybook": "start-storybook -p 6006",
120120
"build-storybook": "build-storybook"
121121
},
122-
"lint-staged": {
123-
"*.{jpg,jpeg,png,gif}": [
124-
"node --loader ts-node/esm scripts/js/optimize-image.ts",
125-
"git add"
126-
]
127-
},
128122
"dependencies": {
129123
"@fontsource/fira-mono": "^4.2.2",
130124
"@lukeed/uuid": "^2.0.0",

scripts/js/sitemap.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const writeToFile = (filePath: string, data): void => fs.writeFileSync(filePath,
1414

1515
const processArguments = process.argv;
1616

17-
const env = getArguments(processArguments, '--env-file');
17+
// const env = getArguments(processArguments, '--env-file');
1818

1919
// const envFile = env
2020
// ? env === 'local'
@@ -59,7 +59,7 @@ const routes = workspace['projects'][project]['routes'];
5959
const assets = workspace['projects'][project]['assets'];
6060

6161
const URL = process.env.VITE_BASE_URL;
62-
const baseURL = URL ? URL : '/';
62+
const baseURL = URL ? URL : 'https://sveltekit-blog-ashy.vercel.app';
6363
const pages = [''];
6464

6565
fs.readdirSync(`${root}/${routes}`).forEach((file) => {

src/global.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ declare module '*.wbep' {
6464
declare module 'micro-cookie-session';
6565
declare module 'svelte-awesome';
6666
declare module 'gatsby-remark-prismjs/highlight-code.js';
67-
declare module 'svelte-image';
6867

6968
// Start: Interfaces
7069

src/lib/layouts/blog-layout/BlogLayout.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
export let blog!: IBlogLayout;
2121
2222
// Local Methods
23-
const editUrl = (slug: string): string => `${blog.metadata.edit}`;
23+
const editUrl = (slug: string): string => `${environment.gitHubConfig.GITHUB_BLOG_EDIT_URL}/${slug}.mdsvex`;
2424
const discussUrl = (slug: string): string =>
2525
`${environment.twitterConfig.TWITTER_SEARCH_URL}?q=${encodeURIComponent(
2626
`https://navneetsharma.io/blog/${slug}`,
@@ -73,7 +73,7 @@
7373
<ShareButtons
7474
title="{blog.metadata.title}"
7575
description="{blog.metadata.description}"
76-
url="{`${''}/blog/${blog.metadata.slug}`}"
76+
url="{`${environment.launchURL}/blog/${blog.metadata.slug}`}"
7777
/>
7878
</div>
7979
<div class="text-sm text-gray-700 dark:text-gray-300 mt-8">

0 commit comments

Comments
 (0)