-
-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
4,267 additions
and
2,241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# blacklist everything | ||
/* | ||
|
||
# whitelist | ||
# | ||
!/Dockerfile | ||
!/package.json | ||
!/package-lock.json | ||
!/next.config.js | ||
!/components/ | ||
!/helpers/ | ||
!/pages/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
firebase 8.4.0 | ||
nodejs 12.16.3 | ||
gcloud 293.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# COPY Files | ||
FROM node:12-alpine AS build-env | ||
WORKDIR /app | ||
COPY . . | ||
RUN npm install && npm run build | ||
|
||
# Copy app and deps | ||
FROM node:12-alpine | ||
WORKDIR /app | ||
COPY --from=build-env /app . | ||
RUN rm -rf node_modules && npm install --only=production | ||
|
||
# Run Next.js | ||
CMD ["npm", "run", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
function Footer() { | ||
return ( | ||
<> | ||
<footer> | ||
Powered by | ||
<a | ||
href="https://firebase.google.com/products/hosting" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
<img src="/firebase-hosting.svg" alt="Firebase Hosting Logo" /> | ||
</a> | ||
& | ||
<a | ||
href="https://zeit.co?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
<img src="/nextjs.svg" alt="Next.js Logo" className="nextjs" /> | ||
</a> | ||
</footer> | ||
|
||
<style jsx>{` | ||
footer { | ||
width: 100%; | ||
height: 100px; | ||
border-top: 1px solid #eaeaea; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
footer img { | ||
max-height: 72px; | ||
margin-left: 0.5rem; | ||
} | ||
footer a { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
footer img.nextjs { | ||
margin-left: 1rem; | ||
max-height: 48px; | ||
} | ||
`}</style> | ||
</> | ||
); | ||
} | ||
|
||
export default Footer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react'; | ||
import Link from 'next/link'; | ||
|
||
export default function Header() { | ||
return ( | ||
<header> | ||
<Link href="/"> | ||
<a>Home</a> | ||
</Link>{' '} | ||
<Link href="/blog"> | ||
<a>Blog</a> | ||
</Link>{' '} | ||
<Link href="/about"> | ||
<a>About</a> | ||
</Link> | ||
</header> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"firestore": { | ||
"rules": "firestore.rules" | ||
}, | ||
"hosting": { | ||
"site": "TODO_YOUR_WEB_APP_DEPLOY_TARGET_HERE", | ||
"public": "public", | ||
"cleanUrls": true, | ||
"rewrites": [ | ||
{ | ||
"source": "**", | ||
"run": { | ||
"serviceId": "nextjs-app", | ||
"region": "us-central1" | ||
} | ||
} | ||
] | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
function generatePosts(data) { | ||
return data | ||
? data.documents.map((post) => { | ||
return { | ||
pid: post.name.split('/').pop(), | ||
title: post.fields.title.stringValue, | ||
blurb: post.fields.blurb.stringValue, | ||
}; | ||
}) | ||
: []; | ||
} | ||
|
||
export { generatePosts }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
env: { | ||
FIREBASE_PROJECT_ID: 'TODO_YOUR_PROJECT_ID_HERE', | ||
}, | ||
experimental: { | ||
sprFlushToDisk: false, | ||
}, | ||
}; |
Oops, something went wrong.