├── .editorconfig ├── .gitignore ├── .prettierignore ├── .prettierrc ├── LICENSE ├── README.md ├── contents ├── 1.md ├── 2.md ├── 3.md ├── 4.md └── 5.md ├── cypress.json ├── cypress ├── fixtures │ └── example.json ├── integration │ └── spec.js ├── plugins │ └── index.js └── support │ ├── commands.js │ └── index.js ├── netlify.toml ├── package.json ├── rollup.config.js ├── src ├── client.js ├── components │ ├── Breadcrumb.svelte │ ├── Footer.svelte │ ├── Nav.svelte │ └── Posts.svelte ├── routes │ ├── [page([0-9]+)].json.js │ ├── [page([0-9]+)].svelte │ ├── _error.svelte │ ├── _layout.svelte │ ├── about.svelte │ ├── blog │ │ ├── [slug].json.js │ │ └── [slug].svelte │ ├── contact.svelte │ ├── index.json.js │ └── index.svelte ├── server.js ├── service-worker.js ├── styles │ └── global.scss ├── template.html └── utils │ └── formatter.js ├── static ├── favicon.png ├── global.css ├── logo-192.png ├── logo-512.png ├── logo.png └── manifest.json ├── svelte.config.js ├── theme.config.js └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | indent_style = space 7 | indent_size = 2 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /node_modules/ 3 | /src/node_modules/@sapper/ 4 | yarn-error.log 5 | /cypress/screenshots/ 6 | /__sapper__/ 7 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | /.history/ 2 | /coverage/ 3 | /node_modules/ 4 | **/node_modules/ 5 | **/__sapper__/ 6 | **/cypress/screenshots/ -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "endOfLine": "auto", 4 | "proseWrap": "preserve", 5 | "trailingComma": "all", 6 | "tabWidth": 2, 7 | "useTabs": false 8 | } 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Varun A P 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Stunning Theme 2 | 3 |
4 | 5 | ![Stunning Theme Logo](/static/logo.png) 6 | 7 |
8 | 9 | Starter blog theme built on top of Sapper(Svelte). 10 | 11 | **Features:** 12 | 13 | - Ability to generate a Static site 14 | - Supports Markdown files for blog posts 15 | - Built-in pagination 16 | 17 | ## Getting started 18 | 19 | ```bash 20 | npx degit apvarun/sapper-stunning-theme stunning-theme 21 | cd stunning-theme 22 | npm install # or yarn! 23 | npm run dev # or yarn dev 24 | ``` 25 | 26 | Open up [localhost:3000](http://localhost:3000) to launch the website. 27 | 28 | ## Structure 29 | 30 | _[ WIP ]_ 31 | 32 | ## Deploy 33 | 34 | [![Deploy With Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/apvarun/sapper-stunning-theme) 35 | 36 | ## Bugs and feedback 37 | 38 | Stunning theme is in development, and may have the odd rough edge here and there. Please be vocal over on the [Repository issue tracker](https://github.com/apvarun/sapper-stunning-theme/issues). 39 | -------------------------------------------------------------------------------- /contents/1.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Post 1" 3 | date: "2018-12-30" 4 | excerpt: "Donut pudding chupa chups jelly beans. Apple pie soufflé dessert. Gummi bears pie pudding jujubes pudding tiramisu bear claw gummi bears. I love wafer donut." 5 | preview: https://cdn.dribbble.com/users/1818193/screenshots/9305805/card_ui_2x.jpg 6 | --- 7 | 8 | Marshmallow dessert liquorice gummies liquorice pie bonbon gingerbread. Bear claw gingerbread sesame snaps pastry I love sugar plum cake cotton candy. Jujubes gingerbread sweet roll ice cream powder I love. I love brownie I love muffin sweet I love. 9 | 10 | > Donut pudding chupa chups jelly beans. Apple pie soufflé dessert. Gummi bears pie pudding jujubes pudding tiramisu bear claw gummi bears. I love wafer donut. 11 | 12 | Sesame snaps oat cake muffin brownie brownie cheesecake. Sesame snaps I love pudding sugar plum jujubes. Candy canes biscuit I love chocolate bar cake lollipop. Tootsie roll macaroon jelly I love pastry. -------------------------------------------------------------------------------- /contents/2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Post 2" 3 | date: "2018-12-30" 4 | excerpt: "Donut pudding chupa chups jelly beans. Apple pie soufflé dessert. Gummi bears pie pudding jujubes pudding tiramisu bear claw gummi bears. I love wafer donut." 5 | preview: https://cdn.dribbble.com/users/1818193/screenshots/9305805/card_ui_2x.jpg 6 | --- 7 | 8 | Marshmallow dessert liquorice gummies liquorice pie bonbon gingerbread. Bear claw gingerbread sesame snaps pastry I love sugar plum cake cotton candy. Jujubes gingerbread sweet roll ice cream powder I love. I love brownie I love muffin sweet I love. 9 | 10 | > Donut pudding chupa chups jelly beans. Apple pie soufflé dessert. Gummi bears pie pudding jujubes pudding tiramisu bear claw gummi bears. I love wafer donut. 11 | 12 | Sesame snaps oat cake muffin brownie brownie cheesecake. Sesame snaps I love pudding sugar plum jujubes. Candy canes biscuit I love chocolate bar cake lollipop. Tootsie roll macaroon jelly I love pastry. -------------------------------------------------------------------------------- /contents/3.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Post 3" 3 | date: "2018-12-30" 4 | excerpt: "Donut pudding chupa chups jelly beans. Apple pie soufflé dessert. Gummi bears pie pudding jujubes pudding tiramisu bear claw gummi bears. I love wafer donut." 5 | preview: https://cdn.dribbble.com/users/1818193/screenshots/9305805/card_ui_2x.jpg 6 | --- 7 | 8 | Marshmallow dessert liquorice gummies liquorice pie bonbon gingerbread. Bear claw gingerbread sesame snaps pastry I love sugar plum cake cotton candy. Jujubes gingerbread sweet roll ice cream powder I love. I love brownie I love muffin sweet I love. 9 | 10 | > Donut pudding chupa chups jelly beans. Apple pie soufflé dessert. Gummi bears pie pudding jujubes pudding tiramisu bear claw gummi bears. I love wafer donut. 11 | 12 | Sesame snaps oat cake muffin brownie brownie cheesecake. Sesame snaps I love pudding sugar plum jujubes. Candy canes biscuit I love chocolate bar cake lollipop. Tootsie roll macaroon jelly I love pastry. -------------------------------------------------------------------------------- /contents/4.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Post 4" 3 | date: "2018-12-30" 4 | excerpt: "Donut pudding chupa chups jelly beans. Apple pie soufflé dessert. Gummi bears pie pudding jujubes pudding tiramisu bear claw gummi bears. I love wafer donut." 5 | preview: https://cdn.dribbble.com/users/1818193/screenshots/9305805/card_ui_2x.jpg 6 | --- 7 | 8 | Marshmallow dessert liquorice gummies liquorice pie bonbon gingerbread. Bear claw gingerbread sesame snaps pastry I love sugar plum cake cotton candy. Jujubes gingerbread sweet roll ice cream powder I love. I love brownie I love muffin sweet I love. 9 | 10 | > Donut pudding chupa chups jelly beans. Apple pie soufflé dessert. Gummi bears pie pudding jujubes pudding tiramisu bear claw gummi bears. I love wafer donut. 11 | 12 | Sesame snaps oat cake muffin brownie brownie cheesecake. Sesame snaps I love pudding sugar plum jujubes. Candy canes biscuit I love chocolate bar cake lollipop. Tootsie roll macaroon jelly I love pastry. -------------------------------------------------------------------------------- /contents/5.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Post 5" 3 | date: "2018-12-30" 4 | excerpt: "Donut pudding chupa chups jelly beans. Apple pie soufflé dessert. Gummi bears pie pudding jujubes pudding tiramisu bear claw gummi bears. I love wafer donut." 5 | preview: https://cdn.dribbble.com/users/1818193/screenshots/9305805/card_ui_2x.jpg 6 | --- 7 | 8 | Marshmallow dessert liquorice gummies liquorice pie bonbon gingerbread. Bear claw gingerbread sesame snaps pastry I love sugar plum cake cotton candy. Jujubes gingerbread sweet roll ice cream powder I love. I love brownie I love muffin sweet I love. 9 | 10 | > Donut pudding chupa chups jelly beans. Apple pie soufflé dessert. Gummi bears pie pudding jujubes pudding tiramisu bear claw gummi bears. I love wafer donut. 11 | 12 | Sesame snaps oat cake muffin brownie brownie cheesecake. Sesame snaps I love pudding sugar plum jujubes. Candy canes biscuit I love chocolate bar cake lollipop. Tootsie roll macaroon jelly I love pastry. -------------------------------------------------------------------------------- /cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:3000", 3 | "video": false 4 | } -------------------------------------------------------------------------------- /cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } -------------------------------------------------------------------------------- /cypress/integration/spec.js: -------------------------------------------------------------------------------- 1 | describe('Sapper template app', () => { 2 | beforeEach(() => { 3 | cy.visit('/') 4 | }); 5 | 6 | it('has the correct

', () => { 7 | cy.contains('h1', 'Great success!') 8 | }); 9 | 10 | it('navigates to /about', () => { 11 | cy.get('nav a').contains('about').click(); 12 | cy.url().should('include', '/about'); 13 | }); 14 | 15 | it('navigates to /blog', () => { 16 | cy.get('nav a').contains('blog').click(); 17 | cy.url().should('include', '/blog'); 18 | }); 19 | }); -------------------------------------------------------------------------------- /cypress/plugins/index.js: -------------------------------------------------------------------------------- 1 | // *********************************************************** 2 | // This example plugins/index.js can be used to load plugins 3 | // 4 | // You can change the location of this file or turn off loading 5 | // the plugins file with the 'pluginsFile' configuration option. 6 | // 7 | // You can read more here: 8 | // https://on.cypress.io/plugins-guide 9 | // *********************************************************** 10 | 11 | // This function is called when a project is opened or re-opened (e.g. due to 12 | // the project's config changing) 13 | 14 | module.exports = (on, config) => { 15 | // `on` is used to hook into various events Cypress emits 16 | // `config` is the resolved Cypress config 17 | } 18 | -------------------------------------------------------------------------------- /cypress/support/commands.js: -------------------------------------------------------------------------------- 1 | // *********************************************** 2 | // This example commands.js shows you how to 3 | // create various custom commands and overwrite 4 | // existing commands. 5 | // 6 | // For more comprehensive examples of custom 7 | // commands please read more here: 8 | // https://on.cypress.io/custom-commands 9 | // *********************************************** 10 | // 11 | // 12 | // -- This is a parent command -- 13 | // Cypress.Commands.add("login", (email, password) => { ... }) 14 | // 15 | // 16 | // -- This is a child command -- 17 | // Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) 18 | // 19 | // 20 | // -- This is a dual command -- 21 | // Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) 22 | // 23 | // 24 | // -- This is will overwrite an existing command -- 25 | // Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) 26 | -------------------------------------------------------------------------------- /cypress/support/index.js: -------------------------------------------------------------------------------- 1 | // *********************************************************** 2 | // This example support/index.js is processed and 3 | // loaded automatically before your test files. 4 | // 5 | // This is a great place to put global configuration and 6 | // behavior that modifies Cypress. 7 | // 8 | // You can change the location of this file or turn off 9 | // automatically serving support files with the 10 | // 'supportFile' configuration option. 11 | // 12 | // You can read more here: 13 | // https://on.cypress.io/configuration 14 | // *********************************************************** 15 | 16 | // Import commands.js using ES2015 syntax: 17 | import './commands' 18 | 19 | // Alternatively you can use CommonJS syntax: 20 | // require('./commands') 21 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | publish = "__sapper__/export" 3 | command = "yarn export" 4 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "stunning-theme", 3 | "description": "Static Site/Blog built with Sapper with Markdown as content source", 4 | "version": "0.0.1", 5 | "license": "MIT", 6 | "scripts": { 7 | "dev": "sapper dev", 8 | "build": "sapper build --legacy", 9 | "export": "sapper export --legacy", 10 | "start": "node __sapper__/build", 11 | "cy:run": "cypress run", 12 | "cy:open": "cypress open", 13 | "test": "run-p --race dev cy:run", 14 | "prettify": "prettier --config ./.prettierrc --ignore-path ./.prettierignore --check **/*.{js,svelte,html}", 15 | "prettify:fix": "prettier --config ./.prettierrc --ignore-path ./.prettierignore --write **/*.{js,svelte,html}" 16 | }, 17 | "dependencies": { 18 | "compression": "^1.7.1", 19 | "gatsby-source-rss-feed": "^1.1.1", 20 | "polka": "next", 21 | "reading-time": "^1.2.0", 22 | "sapper-sources": "^0.0.2", 23 | "sirv": "^0.4.0" 24 | }, 25 | "devDependencies": { 26 | "@babel/core": "^7.0.0", 27 | "@babel/plugin-syntax-dynamic-import": "^7.0.0", 28 | "@babel/plugin-transform-runtime": "^7.0.0", 29 | "@babel/preset-env": "^7.0.0", 30 | "@babel/runtime": "^7.0.0", 31 | "@rollup/plugin-commonjs": "^11.0.0", 32 | "@rollup/plugin-json": "^4.0.1", 33 | "@rollup/plugin-node-resolve": "^7.0.0", 34 | "@rollup/plugin-replace": "^2.2.0", 35 | "husky": "^4.0.3", 36 | "npm-run-all": "^4.1.5", 37 | "prettier": "^1.19.1", 38 | "prettier-plugin-svelte": "^0.7.0", 39 | "rollup": "^1.20.0", 40 | "rollup-plugin-babel": "^4.0.2", 41 | "rollup-plugin-sass": "^1.2.2", 42 | "rollup-plugin-svelte": "^5.0.1", 43 | "rollup-plugin-terser": "^5.1.3", 44 | "sapper": "^0.27.11", 45 | "sass": "^1.24.3", 46 | "svelte": "^3.49.0", 47 | "svelte-preprocess": "^3.3.0" 48 | }, 49 | "husky": { 50 | "hooks": { 51 | "pre-commit": "pretty-quick --staged --pattern **/*.{js,svelte,css,html}" 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import resolve from "@rollup/plugin-node-resolve"; 2 | import replace from "@rollup/plugin-replace"; 3 | import commonjs from "@rollup/plugin-commonjs"; 4 | import svelte from "rollup-plugin-svelte"; 5 | import babel from "rollup-plugin-babel"; 6 | import { terser } from "rollup-plugin-terser"; 7 | import sveltePreprocess from "svelte-preprocess"; 8 | import sass from "rollup-plugin-sass"; 9 | import json from '@rollup/plugin-json'; 10 | import config from "sapper/config/rollup.js"; 11 | import pkg from "./package.json"; 12 | 13 | const mode = process.env.NODE_ENV; 14 | const dev = mode === "development"; 15 | const legacy = !!process.env.SAPPER_LEGACY_BUILD; 16 | 17 | const onwarn = (warning, onwarn) => 18 | (warning.code === "CIRCULAR_DEPENDENCY" && 19 | /[/\\]@sapper[/\\]/.test(warning.message)) || 20 | onwarn(warning); 21 | const dedupe = importee => 22 | importee === "svelte" || importee.startsWith("svelte/"); 23 | 24 | const preprocess = sveltePreprocess({ 25 | scss: true 26 | }); 27 | 28 | export default { 29 | client: { 30 | input: config.client.input(), 31 | output: config.client.output(), 32 | plugins: [ 33 | json(), 34 | replace({ 35 | "process.browser": true, 36 | "process.env.NODE_ENV": JSON.stringify(mode) 37 | }), 38 | sass({ 39 | // update includePaths to what suits. 40 | // node_modules is probably only necessary if you need to import from a css library 41 | includePaths: ["./src/styles"], 42 | output: "static/global.css" 43 | }), 44 | svelte({ 45 | dev, 46 | hydratable: true, 47 | emitCss: true, 48 | preprocess 49 | }), 50 | resolve({ 51 | browser: true, 52 | dedupe 53 | }), 54 | commonjs(), 55 | 56 | legacy && 57 | babel({ 58 | extensions: [".js", ".mjs", ".html", ".svelte"], 59 | runtimeHelpers: true, 60 | exclude: ["node_modules/@babel/**"], 61 | presets: [ 62 | [ 63 | "@babel/preset-env", 64 | { 65 | targets: "> 0.25%, not dead" 66 | } 67 | ] 68 | ], 69 | plugins: [ 70 | "@babel/plugin-syntax-dynamic-import", 71 | [ 72 | "@babel/plugin-transform-runtime", 73 | { 74 | useESModules: true 75 | } 76 | ] 77 | ] 78 | }), 79 | 80 | !dev && 81 | terser({ 82 | module: true 83 | }) 84 | ], 85 | 86 | onwarn 87 | }, 88 | 89 | server: { 90 | input: config.server.input(), 91 | output: config.server.output(), 92 | plugins: [ 93 | replace({ 94 | "process.browser": false, 95 | "process.env.NODE_ENV": JSON.stringify(mode) 96 | }), 97 | svelte({ 98 | generate: "ssr", 99 | dev, 100 | preprocess 101 | }), 102 | resolve({ 103 | dedupe 104 | }), 105 | commonjs() 106 | ], 107 | external: Object.keys(pkg.dependencies).concat( 108 | require("module").builtinModules || 109 | Object.keys(process.binding("natives")) 110 | ), 111 | 112 | onwarn 113 | }, 114 | 115 | serviceworker: { 116 | input: config.serviceworker.input(), 117 | output: config.serviceworker.output(), 118 | plugins: [ 119 | resolve(), 120 | replace({ 121 | "process.browser": true, 122 | "process.env.NODE_ENV": JSON.stringify(mode) 123 | }), 124 | commonjs(), 125 | !dev && terser() 126 | ], 127 | 128 | onwarn 129 | } 130 | }; 131 | -------------------------------------------------------------------------------- /src/client.js: -------------------------------------------------------------------------------- 1 | import * as sapper from '@sapper/app'; 2 | import './styles/global.scss'; 3 | 4 | sapper.start({ 5 | target: document.querySelector('#sapper'), 6 | }); 7 | -------------------------------------------------------------------------------- /src/components/Breadcrumb.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 | 34 | 35 |
36 | 46 |
47 | -------------------------------------------------------------------------------- /src/components/Footer.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 15 | -------------------------------------------------------------------------------- /src/components/Nav.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 58 | 59 | 78 | -------------------------------------------------------------------------------- /src/components/Posts.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 | 61 | 62 |
63 | {#each postsToDisplay as post} 64 | 65 | {#if post.frontmatter.preview} 66 | 67 | {/if} 68 |

{post.frontmatter.title}

69 |
{post.frontmatter.excerpt}
70 |
71 | {/each} 72 |
73 | -------------------------------------------------------------------------------- /src/routes/[page([0-9]+)].json.js: -------------------------------------------------------------------------------- 1 | import config from '../../theme.config.js'; 2 | import formatter from '../utils/formatter'; 3 | 4 | export async function get(req, res, next) { 5 | const { page } = req.params; 6 | 7 | const source = await config.source; 8 | const response = formatter( 9 | source.contents, 10 | source.postsPerPage, 11 | ).getPostsByPage(page, config.postsPerPage); 12 | 13 | if (response !== null) { 14 | res.setHeader('Content-Type', 'application/json'); 15 | res.end(JSON.stringify(response)); 16 | } else { 17 | next(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/routes/[page([0-9]+)].svelte: -------------------------------------------------------------------------------- 1 | 14 | 15 | 24 | 25 | 28 | 29 | 30 | Stunning Theme - Page {page} 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/routes/_error.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 | 37 | 38 | 39 | {status} 40 | 41 | 42 |
43 |

{status}

44 | 45 |

{error.message}

46 | 47 | {#if dev && error.stack} 48 |
{error.stack}
49 | {/if} 50 |
51 | -------------------------------------------------------------------------------- /src/routes/_layout.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 | 23 | 24 |
25 |
31 | -------------------------------------------------------------------------------- /src/routes/about.svelte: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | About 15 | 16 | 17 |
18 |

About Page

19 | 20 |

21 | Pudding chocolate wafer I love donut. Candy canes gingerbread cake. Cotton 22 | candy cake cotton candy sweet roll. Tootsie roll gummies chupa chups bear 23 | claw. I love bear claw ice cream sugar plum sugar plum toffee sugar plum 24 | cookie. Liquorice cupcake jelly-o dragée sesame snaps sesame snaps. Icing 25 | danish jelly beans pie. 26 |

27 | 28 |

29 | Sugar plum tart pie apple pie sweet roll chupa chups I love. Brownie 30 | caramels lollipop topping liquorice. Chocolate wafer I love cookie ice cream 31 | cake jujubes. Dragée dragée cake sweet jujubes dessert jelly. Ice cream 32 | donut marshmallow bear claw candy liquorice tootsie roll. Chupa chups jelly 33 | danish caramels macaroon. Gingerbread muffin biscuit. Ice cream caramels 34 | jelly beans liquorice apple pie liquorice pastry I love. 35 |

36 | 37 |

38 | Powder biscuit I love brownie. I love jelly-o macaroon I love cupcake bear 39 | claw halvah croissant. Halvah fruitcake I love biscuit caramels candy I love 40 | liquorice toffee. Halvah topping sugar plum brownie lemon drops chocolate 41 | cake halvah jujubes I love. Sugar plum brownie marshmallow carrot cake candy 42 | canes I love gummi bears I love toffee. Brownie halvah chocolate I love 43 | jelly-o fruitcake danish candy canes cake. Biscuit croissant I love carrot 44 | cake cotton candy caramels. Chocolate toffee jelly-o donut cookie jujubes 45 | marshmallow jujubes. Caramels cotton candy candy canes apple pie I love. 46 | Cheesecake candy canes I love fruitcake pudding macaroon biscuit. 47 |

48 |
49 | -------------------------------------------------------------------------------- /src/routes/blog/[slug].json.js: -------------------------------------------------------------------------------- 1 | import config from '../../../theme.config'; 2 | import formatter from '../../utils/formatter'; 3 | 4 | export async function get(req, res, next) { 5 | const { slug } = req.params; 6 | 7 | const source = await config.source; 8 | const post = formatter(source.contents, source.postsPerPage).getPost(slug); 9 | 10 | if (post) { 11 | res.writeHead(200, { 12 | 'Content-Type': 'application/json', 13 | }); 14 | 15 | res.end(JSON.stringify(post)); 16 | } else { 17 | res.writeHead(404, { 18 | 'Content-Type': 'application/json', 19 | }); 20 | 21 | res.end( 22 | JSON.stringify({ 23 | message: `Not found`, 24 | }), 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/routes/blog/[slug].svelte: -------------------------------------------------------------------------------- 1 | 13 | 14 | 23 | 24 | 82 | 83 | 84 | {post.frontmatter.title} 85 | 86 | 87 |
88 |

{post.frontmatter.title}

89 | 92 | {post.frontmatter.title} 93 | 94 |
95 | {@html post.contentHtml} 96 |
97 |
98 | -------------------------------------------------------------------------------- /src/routes/contact.svelte: -------------------------------------------------------------------------------- 1 | 41 | 42 | 43 | Contact 44 | 45 | 46 |
47 |

Contact Page

48 | 49 |
50 |

51 | 55 |

56 |

57 | 61 |

62 |

63 |