提交 6c9fa866 编写于 作者: L Luis Alvarez D 提交者: Tim Neutkens

Updated multiple examples to use /public (#9033)

上级 c941b612
......@@ -18,7 +18,6 @@ const Head = props => (
content={props.description || defaultDescription}
/>
<meta name='viewport' content='width=device-width, initial-scale=1' />
<link rel='icon' href='/static/favicon.ico' />
<link
rel='alternate'
......
......@@ -11,7 +11,7 @@ const feed = {
feed_url: `${siteMeta.siteUrl}/feed.json`,
description: siteMeta.description,
icon: `${siteMeta.siteUrl}/static/apple-touch-icon-152x152.png`,
favicon: `${siteMeta.siteUrl}/static/favicon.ico`,
favicon: `${siteMeta.siteUrl}/favicon.ico`,
author: {
name: siteMeta.author,
url: siteMeta.siteUrl,
......
......@@ -18,7 +18,6 @@ export const Head = props => (
<link rel='icon' sizes='192x192' href='/static/touch-icon.png' />
<link rel='apple-touch-icon' href='/static/touch-icon.png' />
<link rel='mask-icon' href='/static/favicon-mask.svg' color='#49B882' />
<link rel='icon' href='/static/favicon.ico' />
<meta property='og:url' content={props.url || defaultOGURL} />
<meta property='og:title' content={props.title || ''} />
<meta
......
......@@ -39,7 +39,7 @@ now
## The idea behind the example
This example shows how to enable the imports of assets (images, videos, etc.) and get a URL pointing to `/static`.
This example shows how to enable the imports of assets (images, videos, etc.) and get a URL pointing to `/public`.
This is also configurable to point to a CDN changing the `baseUri` to the CDN domain, something similar to this:
......@@ -47,7 +47,7 @@ This is also configurable to point to a CDN changing the `baseUri` to the CDN do
[
"transform-assets-import-to-string",
{
"baseDir": "/static",
"baseDir": "/",
"baseUri": "https://cdn.domain.com"
}
]
......
import avatar from '../static/logo.png'
import avatar from '../public/logo.png'
export default () => <img src={avatar} />
......@@ -27,11 +27,11 @@ Install it and run:
```bash
npm install
ln -f -s ../node_modules/react-md/dist/react-md.light_blue-yellow.min.css static/react-md.light_blue-yellow.min.css
ln -f -s ../node_modules/react-md/dist/react-md.light_blue-yellow.min.css public/react-md.light_blue-yellow.min.css
npm run dev
# or
yarn
ln -f -s ../node_modules/react-md/dist/react-md.light_blue-yellow.min.css static/react-md.light_blue-yellow.min.css
ln -f -s ../node_modules/react-md/dist/react-md.light_blue-yellow.min.css public/react-md.light_blue-yellow.min.css
yarn dev
```
......
......@@ -73,10 +73,7 @@ export default () => {
return (
<div>
<Head>
<link
rel='stylesheet'
href='/static/react-md.light_blue-yellow.min.css'
/>
<link rel='stylesheet' href='/react-md.light_blue-yellow.min.css' />
<link
rel='stylesheet'
href='https://fonts.googleapis.com/css?family=Roboto:300,400,500'
......
../node_modules/react-md/dist/react-md.light_blue-yellow.min.css
\ No newline at end of file
../node_modules/react-md/dist/react-md.light_blue-yellow.min.css
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册