├── .gitignore ├── src ├── routes │ ├── notfound │ │ ├── style.css │ │ └── index.js │ ├── contact-success │ │ ├── index.js │ │ └── style.css │ ├── contact │ │ ├── style.css │ │ └── index.js │ ├── blogs │ │ ├── style.css │ │ └── index.js │ ├── home │ │ ├── style.css │ │ └── index.js │ └── blog │ │ ├── formatted-code-block.js │ │ ├── index.js │ │ └── style.css ├── assets │ ├── favicon.ico │ ├── profile.jpg │ ├── icons │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── apple-touch-icon.png │ │ ├── mstile-150x150.png │ │ ├── android-chrome-192x192.png │ │ └── android-chrome-512x512.png │ ├── brett-jordan-1329359-unsplash.jpg │ ├── cody-black-nm89mzvar5i-unsplash.jpg │ ├── lucas-ludwig-dh2ztme9kni-unsplash.jpg │ └── quotes.svg ├── index.js ├── components │ ├── header │ │ ├── index.js │ │ └── style.css │ └── app.js ├── manifest.json ├── static │ ├── preview.css │ ├── config.yml │ └── admin.html ├── style │ └── index.css ├── template.html └── crawler │ └── index.js ├── .netlify └── state.json ├── netlify.toml ├── .babelrc ├── content ├── images │ ├── cyclist.md │ └── lighthouse.md └── blog │ ├── visiting-goa.md │ ├── wanderlust.md │ └── how-to-share-a-screenshot-of-the-page.md ├── tests ├── __mocks__ │ ├── fileMocks.js │ └── browserMocks.js └── header.test.js ├── preact.config.js ├── README.md ├── prerender-urls.js └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | /build 3 | /*.log 4 | 5 | package-lock.json -------------------------------------------------------------------------------- /src/routes/notfound/style.css: -------------------------------------------------------------------------------- 1 | .notfound { 2 | padding: 0 5%; 3 | } -------------------------------------------------------------------------------- /.netlify/state.json: -------------------------------------------------------------------------------- 1 | { 2 | "siteId": "7ae42434-edff-45ba-ba1d-ffbf86110acd" 3 | } -------------------------------------------------------------------------------- /src/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/preactjs/preact-netlify/HEAD/src/assets/favicon.ico -------------------------------------------------------------------------------- /src/assets/profile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/preactjs/preact-netlify/HEAD/src/assets/profile.jpg -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import './style'; 2 | import App from './components/app'; 3 | 4 | export default App; 5 | -------------------------------------------------------------------------------- /src/assets/icons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/preactjs/preact-netlify/HEAD/src/assets/icons/favicon-16x16.png -------------------------------------------------------------------------------- /src/assets/icons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/preactjs/preact-netlify/HEAD/src/assets/icons/favicon-32x32.png -------------------------------------------------------------------------------- /src/assets/icons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/preactjs/preact-netlify/HEAD/src/assets/icons/apple-touch-icon.png -------------------------------------------------------------------------------- /src/assets/icons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/preactjs/preact-netlify/HEAD/src/assets/icons/mstile-150x150.png -------------------------------------------------------------------------------- /src/assets/brett-jordan-1329359-unsplash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/preactjs/preact-netlify/HEAD/src/assets/brett-jordan-1329359-unsplash.jpg -------------------------------------------------------------------------------- /src/assets/icons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/preactjs/preact-netlify/HEAD/src/assets/icons/android-chrome-192x192.png -------------------------------------------------------------------------------- /src/assets/icons/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/preactjs/preact-netlify/HEAD/src/assets/icons/android-chrome-512x512.png -------------------------------------------------------------------------------- /src/assets/cody-black-nm89mzvar5i-unsplash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/preactjs/preact-netlify/HEAD/src/assets/cody-black-nm89mzvar5i-unsplash.jpg -------------------------------------------------------------------------------- /src/assets/lucas-ludwig-dh2ztme9kni-unsplash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/preactjs/preact-netlify/HEAD/src/assets/lucas-ludwig-dh2ztme9kni-unsplash.jpg -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | 2 | [build] 3 | command = "yarn build" 4 | publish = "build" 5 | [build.environment] 6 | YARN_VERSION = "1.9.4" 7 | YARN_FLAGS = "--no-ignore-optional" -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "test": { 4 | "presets": [ 5 | ["preact-cli/babel", { "modules": "commonjs" }] 6 | ] 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /content/images/cyclist.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Cyclist 3 | date: 2019-08-27T18:55:16.273Z 4 | photo: /assets/brett-jordan-1329359-unsplash.jpg 5 | --- 6 | Cyclist through a city 7 | -------------------------------------------------------------------------------- /content/images/lighthouse.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Lighthouse 3 | date: 2019-10-10T23:57:09.340Z 4 | photo: /assets/lucas-ludwig-dh2ztme9kni-unsplash.jpg 5 | --- 6 | A light house captured from the shore 7 | -------------------------------------------------------------------------------- /tests/__mocks__/fileMocks.js: -------------------------------------------------------------------------------- 1 | // This fixed an error related to the CSS and loading gif breaking my Jest test 2 | // See https://facebook.github.io/jest/docs/en/webpack.html#handling-static-assets 3 | module.exports = 'test-file-stub'; -------------------------------------------------------------------------------- /src/routes/contact-success/index.js: -------------------------------------------------------------------------------- 1 | import { h } from 'preact'; 2 | import style from './style'; 3 | 4 | const photographs = (props) => { 5 | return ( 6 |
That page doesn't exist.
11 |10 |
41 | {blog.preview} 42 |
43 |{props.children});
14 | }
15 | throw new Promise(resolve => {
16 | let language = null;
17 | const highlighter = import('react-syntax-highlighter/dist/esm/prism-light');
18 | let languageSyntax;
19 | switch (props.class) {
20 | case 'lang-js':
21 | language = 'javascript';
22 | languageSyntax = import('react-syntax-highlighter/dist/esm/languages/prism/javascript');
23 | break;
24 | case 'lang-html':
25 | language = 'html';
26 | languageSyntax = import('react-syntax-highlighter/dist/esm/languages/prism/markup');
27 | break;
28 | case 'lang-css':
29 | language = 'css';
30 | languageSyntax = import('react-syntax-highlighter/dist/esm/languages/prism/css');
31 | break;
32 | case 'lang-ts':
33 | language = 'typescript';
34 | languageSyntax = import('react-syntax-highlighter/dist/esm/languages/prism/typescript');
35 | break;
36 | default:
37 | language = 'markdown';
38 | languageSyntax = import('react-syntax-highlighter/dist/esm/languages/prism/markdown');
39 | break;
40 | }
41 | Promise.all([highlighter, languageSyntax]).then(values => {
42 | const [SyntaxHighlighter, languageHighlighter] = values.map(m => m ? m.default: null);
43 | getFormattedCodeBlock(SyntaxHighlighter, languageHighlighter, language, setComponent, resolve, props);
44 | });
45 | });
46 | }
47 |
48 | function getFormattedCodeBlock(SyntaxHighlighter, languageHighlighter, language, setState, resolve, props) {
49 | language && SyntaxHighlighter.registerLanguage(language, languageHighlighter);
50 | setState(
51 | 36 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do 37 | eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad 38 | minim veniam, quis nostrud exercitation ullamco laboris nisi ut 39 | aliquip ex ea commodo consequat. Duis aute irure dolor in 40 | reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla 41 | pariatur. Excepteur sint occaecat cupidatat non proident, sunt in 42 | culpa qui officia deserunt mollit anim id est laborum. 43 |
44 |45 | Sed ut perspiciatis unde omnis iste natus error sit voluptatem 46 | accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae 47 | ab illo inventore veritatis et quasi architecto beatae vitae dicta 48 | sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit 49 | aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos 50 | qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui 51 | dolorem ipsum quia dolor sit amet, consectetur. 52 |
53 |{props.children};
20 | if (typeof window === 'undefined') {
21 | return (fallback);
22 | }
23 | return (
24 |