Skip to content

Commit

Permalink
MVP Website (#19)
Browse files Browse the repository at this point in the history
* initcommit

* Zap "code persona" which connects to the space theme

* Point Filecorgi @ main

* Automatically optimized images. [ciskip]

* Page checker

* De-IPFS-ize the Contribution Tutorial

* config: keywords, repo links, site name

* add left nav to match outline

* ipfs -> nftutor as temp move, including meh art

* Automatically optimized images. [ciskip]

* Remove unneeded `legacyUrl` values

* Consolidate components

* Disambiguate front-of-site welcome page

* Update redirects

* Add links for coming-soon pages, clarify MVP pages

* Section page writing prompts + all page descriptions

* Expand sidebar; stray page descriptions

* Filecorgi text suggestions

* Generic construction icon

* Automatically optimized images. [ciskip]

* Remove side-nav links to section landing pages

* Redirect section summary pages

* Skeleton content for site front page

* Consolidate contribution guide to one page

* global replace: NFTutor -> NFT School

* fix: superfluous package.json space

* Typo fix to trigger build

Co-authored-by: filecorgi <[email protected]>
Co-authored-by: Jessica Schilling <[email protected]>
  • Loading branch information
3 people authored May 11, 2021
1 parent fcc4a64 commit cf87748
Show file tree
Hide file tree
Showing 69 changed files with 17,181 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Makes Git translate the line ending for the specified extensions while always keeping things with "unix endings" in repo. This means that scripts in this repo won't break if things are checked out and in on a Windows machine.

*.bash eol=lf
*.sh eol=lf

# Keep this line in.
* text=auto
41 changes: 41 additions & 0 deletions .github/workflows/cicheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

# Controls when the action will run.
on:
pull_request:
branches: [ main ]

jobs:
cicheck:
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 # No shallow clone, we need all history!
- name: Setup Python
uses: actions/[email protected]
# Runs a set of commands using the runners shell
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y optipng jpegoptim jq
pip install bs4
pip install requests
pip install scour
- name: Run CI Checks
env:
GH_USERNAME: ${{ secrets.GH_USERNAME }}
GH_USER_EMAIL: ${{ secrets.GH_USER_EMAIL }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GH_USER_ID: ${{ secrets.GH_USER_ID }}
LANGUAGETOOLS_API_KEY: ${{ secrets.LANGUAGETOOLS_API_KEY }}
LANGUAGETOOLS_USERNAME: ${{ secrets.LANGUAGETOOLS_USERNAME }}
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
FIRST_COMMIT: ${{ github.event.pull_request.base.sha }}
LAST_COMMIT: ${{ github.event.after }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: bash ${{github.workspace}}/scripts/cicheck.sh
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# fs & dev
.DS_Store
node_modules
dist
.temp

# logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# editor
.vscode
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Project set up

If you want to build this site locally, run the following:

1. Clone this repository:

```bash
git clone https://github.com/protocol/nft-website.git
```

1. Move into the `nft-website` folder and install the NPM dependencies:

```bash
cd nft-website
npm install
```

1. Boot up the application in _dev mode_:

```bash
npm start
```

1. Open [localhost:8080](http://localhost:8080) in your browser.
1. Close the local server with `CTRL` + `c`.
1. To restart the local server, run `npm start` from within the `nft-website` folder.

## License

All software code is copyright (c) Protocol Labs, Inc. under the **MIT license**. Other written documentation and content is copyright (c) Protocol Labs, Inc. under the [**Creative Commons Attribution-Share-Alike License**](https://creativecommons.org/licenses/by/4.0/).
230 changes: 230 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
// .vuepress/config.js

const DEPLOY_DOMAIN = 'https://docs.ipfs.io'
const SPEEDCURVE_ID = process.env.SPEEDCURVE_ID || ''
const pageSuffix = '/'

module.exports = {
base: '/',
head: require('./head'),
locales: {
'/': {
lang: 'en-US',
title: 'NFT School',
description: 'NFT Developer Resources'
}
},
markdown: {
pageSuffix,
extendMarkdown: md => {
md.set({
breaks: true
})
md.use(require('markdown-it-video'))
md.use(require('markdown-it-footnote'))
md.use(require('markdown-it-task-lists'))
md.use(require('markdown-it-deflist')),
md.use(require('markdown-it-imsize')),
md.use(require('markdown-it-image-lazy-loading'))
}
},
themeConfig: {
algolia: {
apiKey: 'e56fc7c611806522df45191e22ed15ac',
indexName: 'ipfs-docs'
},
defaultImage: '/images/social-card.png',
author: {
name: 'NFT School',
twitter: '@protocollabs'
},
keywords:
'NFT, non-fungible token, nonfungible token, Filecoin, IPFS, dweb, protocol, decentralized web, InterPlanetary File System, dapp, documentation, docs, tutorial, how-to, Protocol Labs',
// edit links
domain: DEPLOY_DOMAIN,
docsRepo: 'protocol/nft-website',
docsDir: 'docs',
docsBranch: 'main',
feedbackWidget: {
docsRepoIssue: 'protocol/nft-website'
},
editLinks: false,
// page nav
nextLinks: false,
prevLinks: false,
// ui/ux
logo: '/images/nftschool-logo.svg',
locales: {
'/': {
label: 'English',
selectText: 'Languages',
ariaLabel: 'Select language',
editLinkText: 'Edit this page',
lastUpdated: 'Last Updated',
serviceWorker: {
updatePopup: {
message: 'New content is available.',
buttonText: 'Refresh'
}
},
nav: require('./nav/en'),
sidebar: [
{
title: 'Concepts',
collapsable: false,
children: [
'/concepts/non-fungible-tokens',
'/concepts/content-addressing',
'/concepts/content-persistence',
'/concepts/blockchains',
'/concepts/distributed-web'
]
},
{
title: 'Tutorials',
collapsable: false,
children: [
'/tutorial/first-steps',
'/tutorial/end-to-end-experience',
'/tutorial/gallery-app',
'/tutorial/minting-app',
'/tutorial/using-nfts-in-games'
]
},
{
title: 'How-tos',
collapsable: false,
children: [
'/how-to/creating-nfts',
'/how-to/managing-nfts',
'/how-to/auditing-nfts'
]
},
{
title: 'Reference',
collapsable: false,
children:
[
'/reference/metadata-schemas',
'/reference/nft-marketplaces',
'/reference/example-apps-code-samples',
'/reference/recommended-tools',
'/reference/featured-sites'
]
},
{
title: 'Contribute',
collapsable: false,
children: [
'/contribute/'
]
}
]
}
}
},
plugins: [
[require('./plugins/vuepress-plugin-speedcurve'), { id: SPEEDCURVE_ID }],
'@vuepress/plugin-back-to-top',
[
'@vuepress/google-analytics',
{
ga: 'UA-96910779-15'
}
],
[
'vuepress-plugin-clean-urls',
{
normalSuffix: pageSuffix,
indexSuffix: pageSuffix,
notFoundPath: '/ipfs-404.html'
}
],
[
'vuepress-plugin-seo',
{
siteTitle: ($page, $site) => $site.title,
title: $page => $page.title,
description: $page => $page.frontmatter.description,
author: ($page, $site) =>
$page.frontmatter.author || $site.themeConfig.author,
tags: $page => $page.frontmatter.tags,
twitterCard: _ => 'summary_large_image',
type: $page =>
['articles', 'posts', 'blog'].some(folder =>
$page.regularPath.startsWith('/' + folder)
)
? 'article'
: 'website',
url: ($page, $site, path) => ($site.themeConfig.domain || '') + path,
image: ($page, $site) =>
$page.frontmatter.image
? ($site.themeConfig.domain || '') + $page.frontmatter.image
: ($site.themeConfig.domain || '') + $site.themeConfig.defaultImage,
publishedAt: $page =>
$page.frontmatter.date && new Date($page.frontmatter.date),
modifiedAt: $page => $page.lastUpdated && new Date($page.lastUpdated),
customMeta: (add, context) => {
const { $site, image } = context
add(
'twitter:site',
($site.themeConfig.author && $site.themeConfig.author.twitter) || ''
)
add('image', image)
add('keywords', $site.themeConfig.keywords)
}
}
],
[
'vuepress-plugin-canonical',
{
// add <link rel="canonical" header (https://tools.ietf.org/html/rfc6596)
// to deduplicate SEO across all copies loaded from various public gateways
baseURL: DEPLOY_DOMAIN
}
],
[
'vuepress-plugin-sitemap',
{
hostname: DEPLOY_DOMAIN,
exclude: ['/ipfs-404.html']
}
],
[
'vuepress-plugin-robots',
{
host: DEPLOY_DOMAIN
}
],
[
'@vuepress/html-redirect',
{
duration: 0
}
],
[
'vuepress-plugin-container',
{
type: 'callout',
defaultTitle: ''
}
],
[
'vuepress-plugin-container',
{
type: 'right',
defaultTitle: ''
}
],
[
'vuepress-plugin-container',
{
type: 'left',
defaultTitle: ''
}
],
'vuepress-plugin-chunkload-redirect',
'vuepress-plugin-ipfs'
],
extraWatchFiles: ['.vuepress/nav/en.js']
}
53 changes: 53 additions & 0 deletions docs/.vuepress/head.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
module.exports = [
[
'meta',
{ name: 'viewport', content: 'width=device-width, initial-scale=1.0' },
],
['link', { rel: 'preconnect', href: 'https://www.google-analytics.com' }],
['link', { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Parisienne&display=swap' }],
[
'link',
{
rel: 'apple-touch-icon',
sizes: '180x180',
href: '/apple-touch-icon.png'
}
],
[
'link',
{
rel: 'icon',
type: 'image/png',
sizes: '32x32',
href: '/favicon-32x32.png'
}
],
[
'link',
{
rel: 'icon',
type: 'image/png',
sizes: '16x16',
href: '/favicon-16x16.png'
}
],
['link', { rel: 'manifest', href: '/manifest.json' }],
[
'link',
{
rel: 'mask-icon',
href: '/safari-pinned-tab.svg',
color: '#3a0839'
}
],
['link', { rel: 'shortcut icon', href: '/favicon.ico' }],
['meta', { name: 'msapplication-TileColor', content: '#3a0839' }],
[
'meta',
{
name: 'msapplication-config',
content: '/browserconfig.xml'
}
],
['meta', { name: 'theme-color', content: '#5bbad5' }]
]
1 change: 1 addition & 0 deletions docs/.vuepress/nav/en.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = []
Loading

0 comments on commit cf87748

Please sign in to comment.