├── docs
├── CNAME
├── _layouts
│ ├── none.txt
│ └── default.html
├── favicon.ico
├── robots.txt
├── tile
│ ├── hn-tile.svg
│ ├── facebook-tile.svg
│ ├── pinboard-tile.svg
│ ├── linkedin-tile.svg
│ ├── googleplus-tile.svg
│ ├── telegram-tile.svg
│ ├── tumblr-tile.svg
│ ├── twitter-tile.svg
│ ├── reddit-tile.svg
│ ├── pinterest-tile.svg
│ ├── vk-tile.svg
│ ├── wordpress-tile.svg
│ ├── whatsapp-tile.svg
│ ├── pocket-tile.svg
│ ├── stumbleupon-tile.svg
│ └── xing-tile.svg
├── index.html
├── favicon.svg
├── status.json
└── _config.yml
├── .dockerignore
├── public
├── favicon.ico
├── robots.txt
├── favicon.svg
├── images
│ └── clippy.svg
├── header.html
└── js
│ └── clipboard.min.js
├── views
├── 500.hbs
├── 404.hbs
├── comparison
│ ├── _index.hbs
│ └── index.hbs
├── sitemap.hbs
├── contact.hbs
├── linkbuilder.hbs
└── index.hbs
├── docker-run.sh
├── .gitignore
├── images-run.sh
├── data
├── html.hbs
├── comparison.json
└── sites.json
├── .editorconfig
├── src
├── util.ts
├── sitemap.ts
├── koa-context.d.ts
├── templates.ts
├── koa-pino-logger.d.ts
├── linkbuilder.ts
├── sites.ts
├── comparison.ts
└── server.ts
├── nodemon.json
├── run.sh
├── partials
├── below.hbs
└── above.hbs
├── tsconfig.json
├── .gcloudignore
├── Dockerfile
├── CONTRIBUTING.md
├── TODO.md
├── package.json
├── .github
└── workflows
│ ├── gcr-deploy.yaml
│ └── codeql-analysis.yml
├── README.md
└── LICENSE.txt
/docs/CNAME:
--------------------------------------------------------------------------------
1 | cdn.simpleshare.dev
2 |
--------------------------------------------------------------------------------
/docs/_layouts/none.txt:
--------------------------------------------------------------------------------
1 | {{content}}
2 |
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | dist/*
2 | .env
3 | node_modules/*
4 | *.sh
--------------------------------------------------------------------------------
/docs/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fileformat/simpleshare/HEAD/docs/favicon.ico
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fileformat/simpleshare/HEAD/public/favicon.ico
--------------------------------------------------------------------------------
/views/500.hbs:
--------------------------------------------------------------------------------
1 | {{> above}}
2 |
{{message}}
3 | {{> below}}
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | #
2 | # robots.txt for simpleshare
3 | #
4 | # Do not index/follow the 'go' URLs
5 | #
6 |
7 | User-Agent: *
8 | Disallow: /go
--------------------------------------------------------------------------------
/views/404.hbs:
--------------------------------------------------------------------------------
1 | {{> above}}
2 | Sorry, I could not find the page you requested: {{url}}
3 | {{> below}}
--------------------------------------------------------------------------------
/views/comparison/_index.hbs:
--------------------------------------------------------------------------------
1 | {{>above}}
2 |
3 |
4 | More social linking site comparisons
5 |
6 |
7 | {{>below}}
--------------------------------------------------------------------------------
/docker-run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -o errexit
4 | set -o pipefail
5 | set -o nounset
6 |
7 | docker build -t simpleshare:latest .
8 | docker run -it -p 4000:4000 simpleshare:latest
9 |
--------------------------------------------------------------------------------
/docs/robots.txt:
--------------------------------------------------------------------------------
1 | ---
2 | layout: none
3 | ---
4 | #
5 | # robots.txt for {{site.production_url | slice: 8, 99}}
6 | #
7 |
8 | User-Agent: *
9 | Disallow: /honeypot.txt
10 | Allow: /
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *~
2 | .cache
3 | *.class
4 | crash.log
5 | dist/
6 | .env
7 | .idea/
8 | .jekyll-metadata
9 | node_modules/
10 | *.pyc
11 | .sass-cache/
12 | _site/
13 | tmp/
14 | _tmp/
15 | venv/
16 |
--------------------------------------------------------------------------------
/images-run.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #
3 | # run Jekyll locally
4 | #
5 |
6 | set -o errexit
7 | set -o pipefail
8 | set -o nounset
9 |
10 | jekyll serve --watch --source docs --port 4000
11 |
--------------------------------------------------------------------------------
/data/html.hbs:
--------------------------------------------------------------------------------
1 | Share on:
2 | {{#each shares}}
3 |
4 | {{/each}}
--------------------------------------------------------------------------------
/docs/tile/hn-tile.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/tile/facebook-tile.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig is awesome: http://EditorConfig.org
2 |
3 | # top-most EditorConfig file
4 | root = true
5 |
6 | [*]
7 | end_of_line = lf
8 | charset = utf-8
9 | indent_size = 4
10 | indent_style = space
11 |
12 | [*.yaml]
13 | indent_size = 2
14 |
15 |
--------------------------------------------------------------------------------
/docs/tile/pinboard-tile.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/util.ts:
--------------------------------------------------------------------------------
1 | function getFirst(value: string | string[] | undefined): string|undefined {
2 |
3 | if (!value) {
4 | return value;
5 | }
6 |
7 | if (Array.isArray(value)) {
8 | return value[0];
9 | }
10 |
11 | return value;
12 | }
13 |
14 | export {
15 | getFirst
16 | }
--------------------------------------------------------------------------------
/docs/tile/linkedin-tile.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/tile/googleplus-tile.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/nodemon.json:
--------------------------------------------------------------------------------
1 | {
2 | "restartable": "rs",
3 | "ignore": [
4 | ".git",
5 | "node_modules",
6 | "tmp"
7 | ],
8 | "verbose": true,
9 | "watch": [
10 | "data/",
11 | "partials/",
12 | "src/"
13 | ],
14 | "env": {
15 | "NODE_ENV": "development"
16 | },
17 | "exec": "tsc && npm run start | npx pino-pretty",
18 | "ext": "csv,hbs,json,ts,yaml"
19 | }
20 |
--------------------------------------------------------------------------------
/docs/tile/telegram-tile.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/tile/tumblr-tile.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/tile/twitter-tile.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | ---
4 | {% assign image_files = site.static_files | where: "extname", ".svg" | where_exp: "item", "item.path != '/favicon.svg'" | sort: "basename" %}
5 |
6 | {% for myimage in image_files %}
7 |
8 | {% endfor %}
9 |
10 |
--------------------------------------------------------------------------------
/src/sitemap.ts:
--------------------------------------------------------------------------------
1 | import * as comparison from './comparison';
2 |
3 | async function sitemap(ctx: any) {
4 |
5 | let urls: string[] = [];
6 |
7 | urls.push(...comparison.getUrls());
8 |
9 | // hard-coded to avoid circular dependencies
10 | urls.push("/index.html");
11 | urls.push("/linkbuilder.html");
12 |
13 | urls.sort();
14 |
15 | await ctx.render('sitemap.hbs', { urls });
16 | ctx.type = "text/xml;charset=utf-8";
17 | }
18 |
19 | export {
20 | sitemap
21 | }
--------------------------------------------------------------------------------
/docs/tile/reddit-tile.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/views/sitemap.hbs:
--------------------------------------------------------------------------------
1 |
2 |
6 | {{#each urls}}
7 |
8 | https://simpleshare.dev{{this}}
9 |
10 | {{/each}}
11 |
12 |
--------------------------------------------------------------------------------
/docs/tile/pinterest-tile.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/tile/vk-tile.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/tile/wordpress-tile.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # run locally for dev
4 | #
5 |
6 | set -o errexit
7 | set -o pipefail
8 | set -o nounset
9 |
10 | #
11 | # load an .env file if it exists
12 | #
13 | ENV_FILE="${1:-./.env}"
14 | if [ -f "${ENV_FILE}" ]; then
15 | echo "INFO: loading '${ENV_FILE}'!"
16 | export $(cat "${ENV_FILE}")
17 | fi
18 |
19 | if [ ! -d "./node_modules" ]; then
20 | echo "INFO: installing node modules!"
21 | npm install
22 | fi
23 |
24 | #
25 | # run in watch mode
26 | #
27 | npx nodemon
28 |
29 |
30 |
--------------------------------------------------------------------------------
/docs/favicon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/favicon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/images/clippy.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/tile/whatsapp-tile.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/koa-context.d.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * typescript isn't finding the correct additions to Koa's context
3 | */
4 |
5 | import * as Koa from 'koa';
6 | import { Logger } from 'pino';
7 | import * as KoaRouter from 'koa-router';
8 |
9 | declare module 'koa' {
10 | interface ExtendableContext {
11 | render(viewPath: string, locals?: any): Promise;
12 | //log: Logger;
13 | isAuthenticated(): boolean;
14 | logger: Logger;
15 | login(user: any, options?: any): Promise;
16 | logout(): void;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/partials/below.hbs:
--------------------------------------------------------------------------------
1 |
2 |
3 | Copyright © 2022 by Andrew Marcuse. All Rights Reserved.
4 |
5 | License
6 | | Contact
7 |
8 |
9 |
10 |
11 |