mirror of
https://github.com/morten-olsen/morten-olsen.github.io.git
synced 2026-02-08 01:46:28 +01:00
feat: init
This commit is contained in:
5
profile/.gitignore
vendored
Normal file
5
profile/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
/node_modules/
|
||||
/*.logs
|
||||
/.yarn/
|
||||
/dist/
|
||||
4
profile/package.json
Normal file
4
profile/package.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "@morten-olsen/personal-webpage-profile",
|
||||
"main": "./dist/index.js"
|
||||
}
|
||||
7
profile/positions/zeronorth.md
Normal file
7
profile/positions/zeronorth.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
company: ZeroNorth
|
||||
title: Senior Software Engineer
|
||||
start: 2021-01-01
|
||||
---
|
||||
|
||||
Hello World
|
||||
1
profile/src/data/index.ts
Normal file
1
profile/src/data/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './positions';
|
||||
14
profile/src/data/positions.ts
Normal file
14
profile/src/data/positions.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Position } from "../types/positions";
|
||||
|
||||
const context = (require as any).context('../../positions', true, /\.md$/)
|
||||
|
||||
const getPositions = () => context.keys().map((key: string) => context(key)).map((a: any) => ({
|
||||
...a,
|
||||
attributes: {
|
||||
...a.attributes,
|
||||
start: a.attributes.start ? new Date(a.attributes.start).getTime() : null,
|
||||
end: a.attributes.end ? new Date(a.attributes.end).getTime() : null,
|
||||
},
|
||||
})) as Position[];
|
||||
|
||||
export { getPositions };
|
||||
2
profile/src/index.ts
Normal file
2
profile/src/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './data';
|
||||
export * from './types';
|
||||
1
profile/src/types/index.ts
Normal file
1
profile/src/types/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './positions';
|
||||
11
profile/src/types/positions.ts
Normal file
11
profile/src/types/positions.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
type Position = {
|
||||
body: string;
|
||||
attributes: {
|
||||
start: number;
|
||||
end?: number;
|
||||
company: string;
|
||||
title: string;
|
||||
};
|
||||
};
|
||||
|
||||
export type { Position };
|
||||
9
profile/tsconfig.json
Normal file
9
profile/tsconfig.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist"
|
||||
},
|
||||
"include": [
|
||||
"./src"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user