Browse Source

feat: add URL checker and fix broken URLs

friedger-patch-1
Alexander Graebe 4 years ago
committed by Alexander Graebe
parent
commit
027a158c27
  1. 23
      mlc_config.json
  2. 7
      next.config.js
  3. 17611
      package-lock.json
  4. 4
      package.json
  5. 1
      src/common/navigation.yaml
  6. 2
      src/pages/authentication/building-todo-app.md
  7. 2
      src/pages/data-storage/collections.md
  8. 2
      src/pages/data-storage/indexing-overview.md
  9. 2
      src/pages/data-storage/integrate-indexing.md
  10. 2
      src/pages/data-storage/storage-guide.md
  11. 2
      src/pages/start-mining.md
  12. 2
      src/pages/storage-hubs/amazon-ec2-deploy.md
  13. 2
      src/pages/storage-hubs/digital-ocean-deploy.md
  14. 2
      src/pages/understand-stacks/atlas-overview.md
  15. 93
      src/pages/understand-stacks/install-api.md
  16. 2
      src/pages/understand-stacks/technical-specs.md
  17. 6
      src/pages/understand-stacks/wire-format.md
  18. 4
      src/pages/write-smart-contracts/counter-tutorial.md
  19. 2
      src/pages/write-smart-contracts/hello-world-tutorial.md
  20. 2
      src/pages/write-smart-contracts/signing-transactions.md

23
mlc_config.json

@ -0,0 +1,23 @@
{
"ignorePatterns": [
{
"pattern": "^http://localhost"
},
{
"pattern": "^https://banter.pub"
}
],
"replacementPatterns": [
{
"pattern": "^/public/images",
"replacement": "https://docs.blockstack.org/images"
},
{
"pattern": "^/",
"replacement": "https://docs.blockstack.org/"
}
],
"timeout": "10s",
"retryOn429": true,
"retryCount": 5
}

7
next.config.js

@ -764,7 +764,12 @@ async function redirects() {
},
{
source: '/stacks-blockchain/install-api',
destination: '/understand-stacks/install-api',
destination: '/understand-stacks/stacks-1.0-info',
permanent: true,
},
{
source: '/understand-stacks/install-api',
destination: '/understand-stacks/stacks-1.0-info',
permanent: true,
},
{

17611
package-lock.json

File diff suppressed because it is too large

4
package.json

@ -105,6 +105,7 @@
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-prettier": "^3.1.4",
"husky": "^4.3.0",
"markdown-link-check": "^3.8.5",
"next-transpile-modules": "^5.0.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
@ -126,7 +127,8 @@
"lint:prettier": "prettier --check \"src/**/*.{ts,tsx,md,mdx}\" *.js",
"lint:prettier:fix": "prettier --write \"src/**/*.{ts,tsx,md,mdx}\" *.js",
"typecheck": "tsc --noEmit",
"typecheck:watch": "npm run typecheck -- --watch"
"typecheck:watch": "npm run typecheck -- --watch",
"check:markdown": "find . -type f -name '*.md' ! -path './node_modules/*' ! -path './_site/*' | xargs -L1 npx markdown-link-check -q -c mlc_config.json"
},
"husky": {
"hooks": {

1
src/common/navigation.yaml

@ -28,7 +28,6 @@ sections:
- path: /atlas-overview
- path: /atlas-how-it-works
- path: /atlas-usage
- path: /install-api
- path: /installing-memcached
- path: /build-apps # is an overview page
- path: /write-smart-contracts

2
src/pages/authentication/building-todo-app.md

@ -173,7 +173,7 @@ As such, it's paramount that users handle them with great care.
The username will be used by the app to generate a URL for sharing your todos, should you choose to make them public.
It is registered on the Stacks blockchain with [BNS](/core/naming/introduction) and associated with your _Secret Key_.
It is registered on the Stacks blockchain with [BNS](/technology/naming-system) and associated with your _Secret Key_.
!["Choose username" screen](/images/todos/choose-username.png)

2
src/pages/data-storage/collections.md

@ -72,7 +72,7 @@ $ which npm
If you have `npm` installed, do the following to run the Contact Manager demo app:
1. If you have a local Blockstack installed, [uninstall it](/browser/local_browser).
1. If you have a local Blockstack installed, uninstall it.
2. Download and install the [Collections Alpha Build](https://github.com/blockstack/blockstack-browser/releases/tag/collections-alpha.1) of the Blockstack Browser client for your OS.

2
src/pages/data-storage/indexing-overview.md

@ -93,4 +93,4 @@ All data is also stored in Gaia; no third-party can revoke access to this data.
All data is encrypted on the client-side before being stored anywhere using Stacks authorization. The application
host cannot inspect, sell, or use user data in any way that a user doesn't explicitly authorize.
If you are not familiar with Gaia, see [read the Gaia documentation](/storage/overview).
If you are not familiar with Gaia, see [read the Gaia documentation](/data-storage/overview).

2
src/pages/data-storage/integrate-indexing.md

@ -218,4 +218,4 @@ The `maxLimit` option is the maximum `limit` field used inside the mongo queries
## Where to go next
Creating models for your application's data is where radiks truly becomes helpful. To learn how to use models, see the [Create and use models](radiks-models) section.
Creating models for your application's data is where radiks truly becomes helpful. To learn how to use models, see the [Create and use models](/data-storage/indexing-models) section.

2
src/pages/data-storage/storage-guide.md

@ -118,4 +118,4 @@ storage.deleteFile('hello.txt').then(() => {
## Related Information
To learn more about the guarantees provided by Gaia, see [Storage write and read](/storage/write-to-read)
To learn more about the guarantees provided by Gaia, see [Storage write and read](/data-storage/storage-write-read)

2
src/pages/start-mining.md

@ -178,7 +178,7 @@ BLOCKSTACK_DEBUG=1 stacks-node xenon
### Prerequisites
Make sure you've followed the [Running the testnet node on Windows](understand-stacks/running-testnet-node#running-the-testnet-node-on-windows) tutorial before starting this tutorial.
Make sure you've followed the [Running the testnet node on Windows](/understand-stacks/running-testnet-node#running-the-testnet-node-on-windows) tutorial before starting this tutorial.
### Generate keychain and get testnet tokens in Windows

2
src/pages/storage-hubs/amazon-ec2-deploy.md

@ -13,7 +13,7 @@ disk for file storage.
-> This documentation is appropriate for advanced power users who are familiar with command line tools, `ssh`, and basic editing configuration files.
-> If you are planning on running an _open-membership hub_ or an _application-specific hub_, see [the Hub Overview](overview).
-> If you are planning on running an _open-membership hub_ or an _application-specific hub_, see [the Hub Overview](/storage-hubs/overview).
## Prerequisites you need

2
src/pages/storage-hubs/digital-ocean-deploy.md

@ -344,7 +344,7 @@ You'll find that the `driver` is set to `aws`. The DigitalOcean space API exactl
5. Set the `serverName` to the droplet you just created.
6. Set the `readURL` to the URL of the DigitalOcean space you just created.
If your space URL called `https://meepers-hub-space.sfo2.digitaloceanspaces.com `, the `readURL` name is `https://meepers-hub-space.sfo2.digitaloceanspaces.com`. 7. Set the `bucket` to the name of the DigitalOcean space you just created.
If your space URL called `https://meepers-hub-space.sfo2.digitaloceanspaces.com`, the `readURL` name is `https://meepers-hub-space.sfo2.digitaloceanspaces.com`. 7. Set the `bucket` to the name of the DigitalOcean space you just created.
If your space is called `meepers-hub-space`, the `bucket` value is `meepers-hub-space`.

2
src/pages/understand-stacks/atlas-overview.md

@ -13,7 +13,7 @@ all chunks are available to clients.
This document is aimed at developers and technical users.
The reader of this document is expected to be familiar with the [Blockchain Naming Service](/core/naming/introduction)(BNS),
The reader of this document is expected to be familiar with the [Blockchain Naming Service](/technology/naming-system/)(BNS),
as well as Stacks's storage system [Gaia](https://github.com/blockstack/gaia). We advise the reader
to familiarize themselves with both systems before approaching this document.

93
src/pages/understand-stacks/install-api.md

@ -1,93 +0,0 @@
---
title: Stacks API
description: Step-by-step instructions for deploying a Stacks API node on Debian or Ubuntu are below.
duration: 30 minutes
tags:
- tutorial
---
## Introduction
- **Step 1:** Make sure you have a Stacks Node running locally (see [instructions](https://github.com/blockstack/blockstack-core/blob/master/README.md#quick-start)).
- **Step 2:** Make sure you have [virtualenv installed](http://docs.python-guide.org/en/latest/dev/virtualenvs/).
Then, setup the API:
```bash
$ sudo apt-get install -y python-pip memcached rng-tools python-dev libmemcached-dev zlib1g-dev libgmp-dev libffi-dev libssl-dev
$ sudo service memcached start
$ sudo pip install virtualenv
$ sudo npm -g install aglio
$ virtualenv api && source api/bin/activate
$ git clone https://github.com/blockstack/blockstack-core.git
$ cd blockstack-core/
$ git checkout stacks-1.0
$ pip install .
$ pip install -r api/requirements.txt
$ blockstack setup_wallet
$ blockstack api start
$ deactivate
$ ./build_docs.sh public_api
```
### Search Subsystem
If you want to enable the search subsystem in your installation, you can
follow the instructions [here](search.html).
### Nginx Deployment
For a production deployment we recommend using nginx and uwsgi:
- **Step 1:** Install nginx and uWSGI:
```bash
$ sudo apt-get install -y nginx
$ sudo pip install uwsgi
```
- **Step 2:** Copy [this sample nginx sites file](../api/nginx/config/nginx_sites-available/blockstack_api) to
> /etc/nginx/sites-available/blockstack_api
and edit the paths depending on the uwsgi blockstack_api socket directory (defaults to /tmp/blockstack_api.sock)
You can test your nginx settings:
```bash
$ sudo nginx -t
```
- **Step 3:** Copy [this sample systemd service file](../api/nginx/config/systemd_system/blockstack_api.service) to
> /etc/systemd/system/blockstack_api.service
and edit the service user and Blockstack paths depending on where your Blockstack repo is located, and
where your virtualenv is located.
Note: The following sed commands will work if the virtualenv is currently active and your shell is in the repo's root directory.
```
$ sudo sed -i "s/User\=USER/User\=$USER/" /etc/systemd/system/blockstack_api.service
$ sudo sed -i "s#/path/to/blockstack#$PWD#" /etc/systemd/system/blockstack_api.service
$ sudo sed -i "s#/path/to/virtualenv#$VIRTUAL_ENV#" /etc/systemd/system/blockstack_api.service
```
- **Step 4:** Get a security certificate from [Let's Encrypt](https://letsencrypt.org/).
```
$ git clone https://github.com/certbot/certbot.git
$ cd certbot/
$ ./certbot-auto --nginx -d <your_domain>
```
And copy the cert files to the path given in the nginx sites file earlier.
- **Step 5:** Start nginx and the Stacks API uwsgi server:
```
sudo systemctl restart blockstack_api
sudo systemctl restart nginx
```
If you run into any issues, please [submit a Github issue](https://github.com/blockstack/stacks-blockchain/issues) and we'll update these
instructions.

2
src/pages/understand-stacks/technical-specs.md

@ -56,5 +56,5 @@ description: Summary of technical specifications of Stacks 2.0
- Two types of authorizations: standard authorization is where originating account is the same as paying account. _Sponsored_ authorization is where originating account and paying account are distinct. For instance, developers or service providers could pay for users to call their smart-contracts.
- For sponsored authorization, first a user signs with the originating account and then a sponsor signs with the paying account.
- Transaction encoding is described [here](https://github.com/blockstack/stacks-blockchain/blob/master/sip/sip-005-blocks-and-transactions.md#transaction-encoding) and [here](/understand-stacks/transactions#encoding)
- Transaction signing and verification are described [here](https://github.com/blockstack/stacks-blockchain/blob/master/sip/sip-005-blocks-and-transactions.md#transaction-signing-and-verifying) and [here](/understand-stacks/transactions.md#signature-and-verification)
- Transaction signing and verification are described [here](https://github.com/blockstack/stacks-blockchain/blob/master/sip/sip-005-blocks-and-transactions.md#transaction-signing-and-verifying) and [here](/understand-stacks/transactions#signature-and-verification)
- Further reading: [Transactions](/understand-stacks/transactions)

6
src/pages/understand-stacks/wire-format.md

@ -170,7 +170,7 @@ Op: `+`
Description: This transaction sets the name state for a name to the given
`value`. In practice, this is used to announce new DNS zone file hashes to the [Atlas
network](/core/atlas/overview).
network](/understand-stacks/atlas-overview).
Example: [e2029990fa75e9fc642f149dad196ac6b64b9c4a6db254f23a580b7508fc34d7](https://www.blocktrail.com/BTC/tx/e2029990fa75e9fc642f149dad196ac6b64b9c4a6db254f23a580b7508fc34d7)
@ -275,7 +275,7 @@ received, the following must be true:
- The BNS nodes must list the sender's BNS name as being a "trusted message
sender"
- The message must have already been propagated through the [Atlas
network](/core/atlas/overview). This transaction references it by content hash.
network](/understand-stacks/atlas-overview). This transaction references it by content hash.
`OP_RETURN` wire format:
@ -396,7 +396,7 @@ Op: `;`
Description: This transaction registers a name and some name state into a
namespace that has been revealed, but not been launched. Only the namespace
creator can import names. See the [namespace creation section](/core/naming/namespaces) for details.
creator can import names. See the [namespace creation section](/technology/naming-system) for details.
Example: [c698ac4b4a61c90b2c93dababde867dea359f971e2efcf415c37c9a4d9c4f312](https://www.blocktrail.com/BTC/tx/c698ac4b4a61c90b2c93dababde867dea359f971e2efcf415c37c9a4d9c4f312)

4
src/pages/write-smart-contracts/counter-tutorial.md

@ -20,7 +20,7 @@ In this tutorial, you learn how to implement a smart contract that stores and ma
## Prerequisites
=> Before you get started, you should complete the [Hello World tutorial](hello-world-tutorial).
=> Before you get started, you should complete the [Hello World tutorial](/write-smart-contracts/hello-world-tutorial).
### Check the Stacks 2.0 status
@ -48,7 +48,7 @@ You will be asked to select a project template. Press down with your arrow keys
❯ Counter
```
Finally, the project dependencies are installed and your project is ready for development. Because you already completed the [Hello World tutorial](tutorial), the project structure is familiar to you. The main difference is that we have additional tests for a new counter smart contract.
Finally, the project dependencies are installed and your project is ready for development. Because you already completed the [Hello World tutorial](/write-smart-contracts/hello-world-tutorial), the project structure is familiar to you. The main difference is that we have additional tests for a new counter smart contract.
## Step 2: Running tests

2
src/pages/write-smart-contracts/hello-world-tutorial.md

@ -14,7 +14,7 @@ images:
In the world of smart contracts, everything is a blockchain transaction. You use tokens in your wallet to deploy a smart contract in a transaction, and each call to that contract after it's published is a transaction, too. That means that at each step, tokens are being exchanged as transaction fees. This tutorial introduces you to this mode of programming, which transforms blockchains into powerful state machines capable of executing complex logic.
Clarity, the smart contracting language used on the Stacks Blockchain, is based on LISP and uses its parenthesized notation. Clarity is an [interpreted language](https://en.wikipedia.org/wiki/Interpreted_language), and [decidable](https://en.wikipedia.org/wiki/Recursive_language). To learn more basics about the language, see the [Introduction to Clarity](overview) topic.
Clarity, the smart contracting language used on the Stacks Blockchain, is based on LISP and uses its parenthesized notation. Clarity is an [interpreted language](https://en.wikipedia.org/wiki/Interpreted_language), and [decidable](https://en.wikipedia.org/wiki/Recursive_language). To learn more basics about the language, see the [Introduction to Clarity](/write-smart-contracts/overview) topic.
By the end of this tutorial, you will:

2
src/pages/write-smart-contracts/signing-transactions.md

@ -100,7 +100,7 @@ These types are named the same as they are in Clarity. The `value` that you pass
- `bool` - can be "true", "false", "0" or "1"
- `buff` - i.e. `"asdf"`
- `principal` - This can be a contract principal, or a standard principal.
[Read more about principals](/core/smart/principals). Examples: `"ST22T6ZS7HVWEMZHHFK77H4GTNDTWNPQAX8WZAKHJ"`
[Read more about principals](/write-smart-contracts/principals). Examples: `"ST22T6ZS7HVWEMZHHFK77H4GTNDTWNPQAX8WZAKHJ"`
or `"ST22T6ZS7HVWEMZHHFK77H4GTNDTWNPQAX8WZAKHJ.my-contract"`.
Using these types, each argument is an object with the keys `type` and `value`. For example:

Loading…
Cancel
Save