Skip to content

Commit

Permalink
chore: update example
Browse files Browse the repository at this point in the history
  • Loading branch information
yugasun committed Oct 19, 2020
1 parent c768e68 commit b2f784d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 245 deletions.
228 changes: 0 additions & 228 deletions example/README.md

This file was deleted.

7 changes: 6 additions & 1 deletion example/next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
const isProd = process.env.NODE_ENV === 'production'

module.exports = {
assetPrefix: ''
env: {
STATIC_URL: isProd ? process.env.STATIC_URL : ''
},
assetPrefix: isProd ? process.env.STATIC_URL : ''
}
3 changes: 2 additions & 1 deletion example/pages/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ a {
text-decoration: none;
}

.title a {
.title a,
.description a {
color: #0070f3;
text-decoration: none;
}
Expand Down
21 changes: 7 additions & 14 deletions example/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Head from 'next/head'
import Link from 'next/link'

const Home = () => (
<div className="container">
Expand All @@ -9,24 +8,18 @@ const Home = () => (
</Head>

<main>
<h1 className="title">
Welcome to <a href="https://nextjs.org">Next.js!</a>
</h1>
<h1 className="title">Welcome to Next.js!</h1>

<p className="description">
Get started by editing <code>pages/index.js</code>
</p>
<p className="description">
The SSR app is hosted on{' '}
<a href="https://cloud.tencent.com/product/ssr" target="_blank" rel="noopener noreferrer">
Serverless SSR
</a>
</p>
</main>

<footer>
<a
href="https://zeit.co?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
Powered by <img src="/zeit.svg" alt="ZEIT Logo" />
</a>
</footer>
</div>
)

Expand Down
1 change: 0 additions & 1 deletion example/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ inputs:
- http
- https
environment: release
serviceName: test

0 comments on commit b2f784d

Please sign in to comment.