Skip to content
This repository has been archived by the owner on Sep 16, 2020. It is now read-only.

Commit

Permalink
feat: Add a simple UI for the project at the root level
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-engel committed Jun 17, 2019
1 parent 069c2d5 commit 1b7cdb4
Show file tree
Hide file tree
Showing 23 changed files with 14,283 additions and 4 deletions.
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
/target
.DS_Store
Thumbs.db

target/
**/*.rs.bk

node_modules/
public/
.cache/
4 changes: 4 additions & 0 deletions .nowignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ target/

/Cargo.toml
/Cargo.lock

node_modules/
public/
.cache/
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# gistcard

> Better gist previews on twitter and other open graph applications
> Show better gist previews in twitter with a code snippet and a link to the gist
`gistcard` is a better way to share gists (until github does this themselves 😉). It shows a snippet of the gist as a preview using [carbon](https://carbon.now.sh) and includes a link to the gist.

Expand Down Expand Up @@ -28,8 +28,18 @@ Please note that this project is released with a [Contributor Code of Conduct](C

I would love to see issues and pull requests to make this a better tool that works for people other than myself!

This project only works with rust's 2018 edition. Thus, you must have version 1.31 or later. Once you have rust installed, you can then run `cargo build` to see it in action. This will download and compile all the dependencies in development mode.
### Rust bits

This project only works with rust's 2018 edition. Thus, you must have version 1.31 or later. Once you have rust installed (I recommend [rustup](https://rustup.sh)), you can then run `cargo build` to see it in action. This will download and compile all the dependencies in development mode.

In theory, you can use now's [`now dev`](https://zeit.co/blog/now-dev), but as of this writing, the rust support still needs some work. In the meantime, you could build a simple binary that uses the library, or you can deploy it to your own [`zeit`](https://zeit.co) account. If you need help, please submit an issue and I'll be happy to try and help you out.

### UI bits

The UI is built with [Gatsby](https://gatsby.org), [Styled Components](https://styled-components.com), and [typescript](https://typescriptlang.org). To start, run `npm install` from within the site folder to download all of the dependencies.

If you wish to use `now dev`, run that from the root directory. This should then be available at [http:https://localhost:3000](http:https://localhost:3000).

To use Gatsby's develop mode, run `npm run dev` from wihin the `site` directory. The URL will be printed to the console, but it is usually [http:https://localhost:8000](http:https://localhost:8000).

## [License](LICENSE.md)
9 changes: 8 additions & 1 deletion now.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@
"alias": ["gistcard.now.sh"],
"builds": [
{ "src": "/img/Cargo.toml", "use": "@now/rust@canary" },
{ "src": "/html/Cargo.toml", "use": "@now/rust@canary" }
{ "src": "/html/Cargo.toml", "use": "@now/rust@canary" },
{
"src": "/site/package.json",
"use": "@now/static-build",
"config": { "distDir": "public" }
}
],
"routes": [
{ "src": "/", "dest": "/site/index.html" },
{ "src": "/((.+).(js|json|css|png))", "dest": "/site/$1" },
{ "src": "/img/(.+).png", "dest": "/img/gistcard_img?id=$1" },
{ "src": "/(.+)", "dest": "/html/gistcard_html?id=$1" }
]
Expand Down
7 changes: 7 additions & 0 deletions site/gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* Implement Gatsby's Browser APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/browser-apis/
*/

// You can delete this file if you're not using it
13 changes: 13 additions & 0 deletions site/gatsby-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
siteMetadata: {
title: `gistcard`,
description: `Show better gist previews in twitter with a code snippet and a link to the gist`,
author: `@beardfury`
},
plugins: [
`gatsby-plugin-react-helmet`,
`gatsby-plugin-styled-components`,
`gatsby-plugin-typescript`
// `gatsby-plugin-offline`,
]
};
7 changes: 7 additions & 0 deletions site/gatsby-node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* Implement Gatsby's Node APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/node-apis/
*/

// You can delete this file if you're not using it
7 changes: 7 additions & 0 deletions site/gatsby-ssr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* Implement Gatsby's SSR (Server Side Rendering) APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/ssr-apis/
*/

// You can delete this file if you're not using it
Loading

1 comment on commit 1b7cdb4

@vercel
Copy link

@vercel vercel bot commented on 1b7cdb4 Jun 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.