diff --git a/package.json b/package.json
index 38d1dd8..075f9d8 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
- "name": "TODO",
- "description": "TODO",
- "version": "0.0.1",
+ "name": "HowFeed.biz",
+ "description": "HowFeed.biz",
+ "version": "0.1.0",
"scripts": {
"dev": "sapper dev",
"build": "sapper build",
diff --git a/src/components/Nav.svelte b/src/components/Nav.svelte
index 49a94ed..37f0abc 100644
--- a/src/components/Nav.svelte
+++ b/src/components/Nav.svelte
@@ -3,58 +3,48 @@
diff --git a/src/routes/_layout.svelte b/src/routes/_layout.svelte
index 8432299..abd788a 100644
--- a/src/routes/_layout.svelte
+++ b/src/routes/_layout.svelte
@@ -1,22 +1,21 @@
First, you have to know what Svelte is. Svelte is a UI framework with a bold new idea: rather than providing a library that you write code with (like React or Vue, for example), it's a compiler that turns your components into highly optimized vanilla JavaScript. If you haven't already read the introductory blog post, you should!
+ +Sapper is a Next.js-style framework (more on that here) built around Svelte. It makes it embarrassingly easy to create extremely high performance web apps. Out of the box, you get:
+ +It's implemented as Express middleware. Everything is set up and waiting for you to get started, but you keep complete control over the server, service worker, webpack config and everything else, so it's as flexible as you need it to be.
+ ` + }, + { + title: 'How to Pay Zero in Taxes', + date: 1590908400000, + html: ` +First, you have to know what Svelte is. Svelte is a UI framework with a bold new idea: rather than providing a library that you write code with (like React or Vue, for example), it's a compiler that turns your components into highly optimized vanilla JavaScript. If you haven't already read the introductory blog post, you should!
+ +Sapper is a Next.js-style framework (more on that here) built around Svelte. It makes it embarrassingly easy to create extremely high performance web apps. Out of the box, you get:
+ +It's implemented as Express middleware. Everything is set up and waiting for you to get started, but you keep complete control over the server, service worker, webpack config and everything else, so it's as flexible as you need it to be.
+ ` + }, + { + title: 'Here\'s Why Canned Water is Better', + date: 1590908400000, + html: ` +First, you have to know what Svelte is. Svelte is a UI framework with a bold new idea: rather than providing a library that you write code with (like React or Vue, for example), it's a compiler that turns your components into highly optimized vanilla JavaScript. If you haven't already read the introductory blog post, you should!
+ +Sapper is a Next.js-style framework (more on that here) built around Svelte. It makes it embarrassingly easy to create extremely high performance web apps. Out of the box, you get:
+ +It's implemented as Express middleware. Everything is set up and waiting for you to get started, but you keep complete control over the server, service worker, webpack config and everything else, so it's as flexible as you need it to be.
+ ` + } +]; + +posts.forEach(post => { + post.slug = post.title.toLowerCase().replace(/\W+/g, '-'); + post.html = post.html.replace(/^\t{3}/gm, ''); +}); + +export default posts; diff --git a/src/routes/about.svelte b/src/routes/about.svelte deleted file mode 100644 index e1734b3..0000000 --- a/src/routes/about.svelte +++ /dev/null @@ -1,7 +0,0 @@ -This is the 'about' page. There's not much here.
\ No newline at end of file diff --git a/src/routes/blog/[slug].json.js b/src/routes/blog/[slug].json.js deleted file mode 100644 index 176890d..0000000 --- a/src/routes/blog/[slug].json.js +++ /dev/null @@ -1,28 +0,0 @@ -import posts from './_posts.js'; - -const lookup = new Map(); -posts.forEach(post => { - lookup.set(post.slug, JSON.stringify(post)); -}); - -export function get(req, res, next) { - // the `slug` parameter is available because - // this file is called [slug].json.js - const { slug } = req.params; - - if (lookup.has(slug)) { - res.writeHead(200, { - 'Content-Type': 'application/json' - }); - - res.end(lookup.get(slug)); - } else { - res.writeHead(404, { - 'Content-Type': 'application/json' - }); - - res.end(JSON.stringify({ - message: `Not found` - })); - } -} diff --git a/src/routes/blog/[slug].svelte b/src/routes/blog/[slug].svelte deleted file mode 100644 index 9e0c419..0000000 --- a/src/routes/blog/[slug].svelte +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - -First, you have to know what Svelte is. Svelte is a UI framework with a bold new idea: rather than providing a library that you write code with (like React or Vue, for example), it's a compiler that turns your components into highly optimized vanilla JavaScript. If you haven't already read the introductory blog post, you should!
- -Sapper is a Next.js-style framework (more on that here) built around Svelte. It makes it embarrassingly easy to create extremely high performance web apps. Out of the box, you get:
- -It's implemented as Express middleware. Everything is set up and waiting for you to get started, but you keep complete control over the server, service worker, webpack config and everything else, so it's as flexible as you need it to be.
- ` - }, - - { - title: 'How to use Sapper', - slug: 'how-to-use-sapper', - html: ` -Create a new project, using degit:
- -npx degit "sveltejs/sapper-template#rollup" my-app
- cd my-app
- npm install # or yarn!
- npm run dev
-
-
- Go to localhost:3000. Open my-app
in your editor. Edit the files in the src/routes
directory or add new ones.
...
- -Resist overdone joke formats.
- ` - }, - - { - title: 'Why the name?', - slug: 'why-the-name', - html: ` -In war, the soldiers who build bridges, repair roads, clear minefields and conduct demolitions — all under combat conditions — are known as sappers.
- -For web developers, the stakes are generally lower than those for combat engineers. But we face our own hostile environment: underpowered devices, poor network connections, and the complexity inherent in front-end engineering. Sapper, which is short for Svelte app maker, is your courageous and dutiful ally.
- ` - }, - - { - title: 'How is Sapper different from Next.js?', - slug: 'how-is-sapper-different-from-next', - html: ` -Next.js is a React framework from Vercel, and is the inspiration for Sapper. There are a few notable differences, however:
- -src/routes/blog/[slug].svelte
routes
directory. These are just .js
files that export functions corresponding to HTTP methods, and receive Express request
and response
objects as arguments. This makes it very easy to, for example, add a JSON API such as the one powering this very page<a>
elements, rather than framework-specific <Link>
components. That means, for example, that this link right here, despite being inside a blob of HTML, works with the router as you'd expect.We're so glad you asked! Come on over to the Svelte and Sapper repos, and join us in the Discord chatroom. Everyone is welcome, especially you!
- ` - } -]; - -posts.forEach(post => { - post.html = post.html.replace(/^\t{3}/gm, ''); -}); - -export default posts; diff --git a/src/routes/blog/index.json.js b/src/routes/blog/index.json.js deleted file mode 100644 index bfd9389..0000000 --- a/src/routes/blog/index.json.js +++ /dev/null @@ -1,16 +0,0 @@ -import posts from './_posts.js'; - -const contents = JSON.stringify(posts.map(post => { - return { - title: post.title, - slug: post.slug - }; -})); - -export function get(req, res) { - res.writeHead(200, { - 'Content-Type': 'application/json' - }); - - res.end(contents); -} \ No newline at end of file diff --git a/src/routes/blog/index.svelte b/src/routes/blog/index.svelte deleted file mode 100644 index e24f711..0000000 --- a/src/routes/blog/index.svelte +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - -Try editing this file (src/routes/index.svelte) to test live reloading.
+ +