Skip to content

Commit 5bf9414

Browse files
authored
Staging Environment (#58)
* Feature/article content creator (#40) (#42) * Created new post src/lib/articles/content/articles/2020-7-1-An-Introduction-to-Value-Innovation}.json with TinaCMS * Fix bad name * Remove example post * Created new post src/lib/articles/content/articles/2020-08-31-test.json with TinaCMS * Created new post src/lib/articles/content/articles/2020-08-31-test-2.json with TinaCMS * Upload * Update from TinaCMS * Upload * Update from TinaCMS * Refactor to support content creation * Fix article slugs on archive * Make left aligned hero prettier * Fix vertical alignment * Update timestamp format * Update timestamp format * Add proper reading time and post date * Created new post src/lib/articles/content/articles/2020-08-31-test-3.json with TinaCMS * Fix on 0 length content: * Properly working reading time and english post time * Remove test files * Refactor data fetching to be more terse in controllers, and fix article creation oddities * Fix post time in kitchen sink * Created new post src/lib/articles/content/articles/2020-09-01-test.json with TinaCMS * Fix branching * Remove test doc * Set preview branch on creation of new file * Remove annoying mac file * Fix kitchen sink * Remove console.log * Fetch articles from remote in editing mode * Fix path * Enable incremental SSG for articles * Fix fallback behaviour * Enable dynamic paging * Enable dynamic paging * Try fixing 500? * Refactor to a packages setup * Fix SSR * Fix syntax error * Fix build * Fix build * Fix build * Fix build * Fix styling and editing * Fix build * Fix build
1 parent 3533e8a commit 5bf9414

File tree

106 files changed

+7816
-477
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+7816
-477
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,7 @@ dist
114114
.yarn/build-state.yml
115115
.yarn/install-state.gz
116116
.pnp.*
117-
.vercel
117+
.vercel
118+
119+
# Custom
120+
.DS_Store

next.config.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require('dotenv').config()
2+
const { resolve } = require("path")
23

34
const VERCEL_BRANCH = process.env.VERCEL_GITHUB_COMMIT_REF;
45
const SYSTEM_BRANCH = require("child_process")
@@ -13,13 +14,19 @@ module.exports = {
1314
GITHUB_CLIENT_ID: process.env.GITHUB_CLIENT_ID,
1415
REPO_FULL_NAME: process.env.REPO_FULL_NAME,
1516
BASE_BRANCH: BRANCH ? BRANCH : process.env.BASE_BRANCH,
16-
USE_REMOTE: false
17+
USE_REMOTE: process.env.USE_REMOTE == "true"
1718
},
1819
webpack: (config, options) => {
1920
config.node = {
2021
fs: 'empty'
2122
}
2223

24+
config.resolve.alias = {
25+
...(config.resolve.alias || {}),
26+
"cdm-content": resolve(__dirname, "./packages/cdm-content"),
27+
"cdm-ui": resolve(__dirname, "./packages/cdm-ui"),
28+
}
29+
2330
return config;
2431
}
2532
}

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@
1313
"antd": "^4.3.4",
1414
"bootstrap": "^4.5.2",
1515
"dotenv": "^8.2.0",
16-
"next": "9.4.4",
16+
"next": "^10.0.3",
1717
"next-tinacms-github": "^0.1.1",
1818
"react": "16.13.1",
1919
"react-aria": "^0.9.5",
2020
"react-bootstrap": "^1.3.0",
2121
"react-dom": "16.13.1",
2222
"react-three-fiber": "^4.2.20",
23-
"react-tinacms-editor": "^0.29.0",
24-
"react-tinacms-github": "^0.4.3",
25-
"react-tinacms-inline": "^0.8.0",
23+
"react-tinacms-editor": "^0.34.0",
24+
"react-tinacms-github": "^0.34.0",
25+
"react-tinacms-inline": "^0.34.0",
2626
"remark": "^12.0.1",
2727
"remark-html": "^12.0.0",
2828
"remark-preset-lint-markdown-style-guide": "^3.0.1",
2929
"slugify": "^1.4.5",
3030
"styled-components": "^5.1.1",
31-
"tinacms": "^0.21.2",
31+
"tinacms": "^0.34.0",
3232
"use-color-scheme": "^1.1.1",
3333
"use-dark-mode": "^2.3.1",
3434
"vercel": "^19.1.1"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { default as articleArchiveData } from "./content/articles.json";
2+
export * from "./models"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { Block } from "react-tinacms-inline";
2+
import { ArticleHeroProps } from "../../../cdm-ui/articles/components/Hero";
3+
4+
export interface Article {
5+
title: string;
6+
description: string;
7+
featured_image: string | undefined;
8+
created_date: string | Date;
9+
edited_date: string | Date;
10+
categories: [] | [{
11+
title: string
12+
href: string
13+
}],
14+
author: {
15+
fullName: string,
16+
photo: string
17+
},
18+
hero: {
19+
variant: ArticleHeroProps['variant'];
20+
}
21+
body: Block[]
22+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./article"
File renamed without changes.

0 commit comments

Comments
 (0)