Commit 6c9fa866 authored by Luis Alvarez D's avatar Luis Alvarez D Committed by Tim Neutkens

Updated multiple examples to use /public (#9033)

parent c941b612
...@@ -18,7 +18,6 @@ const Head = props => ( ...@@ -18,7 +18,6 @@ const Head = props => (
content={props.description || defaultDescription} content={props.description || defaultDescription}
/> />
<meta name='viewport' content='width=device-width, initial-scale=1' /> <meta name='viewport' content='width=device-width, initial-scale=1' />
<link rel='icon' href='/static/favicon.ico' />
<link <link
rel='alternate' rel='alternate'
......
...@@ -11,7 +11,7 @@ const feed = { ...@@ -11,7 +11,7 @@ const feed = {
feed_url: `${siteMeta.siteUrl}/feed.json`, feed_url: `${siteMeta.siteUrl}/feed.json`,
description: siteMeta.description, description: siteMeta.description,
icon: `${siteMeta.siteUrl}/static/apple-touch-icon-152x152.png`, icon: `${siteMeta.siteUrl}/static/apple-touch-icon-152x152.png`,
favicon: `${siteMeta.siteUrl}/static/favicon.ico`, favicon: `${siteMeta.siteUrl}/favicon.ico`,
author: { author: {
name: siteMeta.author, name: siteMeta.author,
url: siteMeta.siteUrl, url: siteMeta.siteUrl,
......
...@@ -18,7 +18,6 @@ export const Head = props => ( ...@@ -18,7 +18,6 @@ export const Head = props => (
<link rel='icon' sizes='192x192' href='/static/touch-icon.png' /> <link rel='icon' sizes='192x192' href='/static/touch-icon.png' />
<link rel='apple-touch-icon' 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='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:url' content={props.url || defaultOGURL} />
<meta property='og:title' content={props.title || ''} /> <meta property='og:title' content={props.title || ''} />
<meta <meta
......
...@@ -39,7 +39,7 @@ now ...@@ -39,7 +39,7 @@ now
## The idea behind the example ## 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: 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 ...@@ -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", "transform-assets-import-to-string",
{ {
"baseDir": "/static", "baseDir": "/",
"baseUri": "https://cdn.domain.com" "baseUri": "https://cdn.domain.com"
} }
] ]
......
import avatar from '../static/logo.png' import avatar from '../public/logo.png'
export default () => <img src={avatar} /> export default () => <img src={avatar} />
...@@ -27,11 +27,11 @@ Install it and run: ...@@ -27,11 +27,11 @@ Install it and run:
```bash ```bash
npm install 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 npm run dev
# or # or
yarn 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 yarn dev
``` ```
......
...@@ -73,10 +73,7 @@ export default () => { ...@@ -73,10 +73,7 @@ export default () => {
return ( return (
<div> <div>
<Head> <Head>
<link <link rel='stylesheet' href='/react-md.light_blue-yellow.min.css' />
rel='stylesheet'
href='/static/react-md.light_blue-yellow.min.css'
/>
<link <link
rel='stylesheet' rel='stylesheet'
href='https://fonts.googleapis.com/css?family=Roboto:300,400,500' 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% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment