Skip to content

Commit 15a5f08

Browse files
committed
Update website build
1 parent c218d80 commit 15a5f08

File tree

8 files changed

+1141
-1072
lines changed

8 files changed

+1141
-1072
lines changed

Dockerfile

+5-9
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,17 @@ FROM node:10 as build
33

44
WORKDIR /app
55

6-
# Install and cache app dependencies
7-
COPY website/package.json /app/package.json
8-
COPY website/yarn.lock /app/yarn.lock
9-
RUN yarn
10-
11-
# Invalidate cache from here on
6+
# Invalidate cache
127
ADD "http://worldtimeapi.org/api/timezone/Europe/Amsterdam.txt" skipcache
138

9+
# Add app
10+
COPY website /app
11+
RUN yarn
12+
1413
# Remove potentially cached Docusaurus files
1514
RUN rm -rf /app/.docusaurus
1615
RUN rm -rf /app/build
1716

18-
# Add app
19-
COPY website /app
20-
2117
# Generate build
2218
RUN yarn build
2319

website/docs/basics/about.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ sidebar_label: About CashScript
55

66
CashScript is a high-level programming language for smart contracts on Bitcoin Cash. It offers a strong abstraction layer over Bitcoin Cash' native virtual machine, Bitcoin Script. Its syntax is based on Ethereum's smart contract language Solidity, but its functionality is very different since smart contracts on Bitcoin Cash differ greatly from smart contracts on Ethereum. For a detailed comparison of them, refer to the blog post [*Smart Contracts on Ethereum, Bitcoin and Bitcoin Cash*](https://kalis.me/smart-contracts-eth-btc-bch/).
77

8-
If you're interested to see what kind of things can be built with CashScript, you can look at the [Showcase](/docs/showcase) or [Examples](/docs/examples). If you just want to dive into CashScript, refer to the [Getting Started page](/docs/basics/getting-started) and other pages in the documentation.
8+
If you're interested to see what kind of things can be built with CashScript, you can look at the [Showcase](/docs/showcase) or [Examples](/docs/language/examples). If you just want to dive into CashScript, refer to the [Getting Started page](/docs/basics/getting-started) and other pages in the documentation.

website/docs/basics/getting-started.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ CashScript only offers a JavaScript SDK, but CashScript contracts can be integra
2121
:::
2222

2323
## Writing your first smart contract
24-
There are some examples available on the [Examples page](/docs/examples), that can be used to take inspiration from. Further examples of the JavaScript integration can be found on [GitHub](https://github.com/Bitcoin-com/cashscript/tree/master/examples). A simple example is included below.
24+
There are some examples available on the [Examples page](/docs/language/examples), that can be used to take inspiration from. Further examples of the JavaScript integration can be found on [GitHub](https://github.com/Bitcoin-com/cashscript/tree/master/examples). A simple example is included below.
2525

2626
```solidity
2727
pragma cashscript ^0.4.0;
@@ -41,7 +41,7 @@ contract TransferWithTimeout(pubkey sender, pubkey recipient, int timeout) {
4141
```
4242

4343
:::tip
44-
Read more about the CashScript language syntax in the [Language Description](/docs/language).
44+
Read more about the CashScript language syntax in the [Language Description](/docs/language/contracts).
4545
:::
4646

4747
## Integrating into JavaScript
@@ -78,5 +78,5 @@ async function run() {
7878
```
7979

8080
:::tip
81-
Read more about the JavaScript SDK in the [SDK documentation](/docs/sdk).
81+
Read more about the JavaScript SDK in the [SDK documentation](/docs/sdk/instantiation).
8282
:::

website/docusaurus.config.js

+17-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = {
2222
src: 'img/logo.svg',
2323
},
2424
links: [
25-
{to: '/docs/', label: 'Docs', position: 'right'},
25+
{to: '/docs/basics/about', label: 'Docs', position: 'right'},
2626
{
2727
href: 'https://github.com/Bitcoin-com/cashscript',
2828
label: 'GitHub',
@@ -38,11 +38,11 @@ module.exports = {
3838
items: [
3939
{
4040
label: 'Getting Started',
41-
to: '/docs/getting-started',
41+
to: '/docs/basics/getting-started',
4242
},
4343
{
4444
label: 'Examples',
45-
to: '/docs/examples',
45+
to: '/docs/language/examples',
4646
},
4747
],
4848
},
@@ -112,6 +112,19 @@ module.exports = {
112112
],
113113
],
114114
plugins: [
115-
path.resolve(__dirname, './src/plugins/redirects'),
115+
[
116+
'@docusaurus/plugin-client-redirects',
117+
{
118+
fromExtensions: ['html'],
119+
redirects: [
120+
{ from: ['/docs', '/docs/about', '/docs/basics'], to: '/docs/basics/about'},
121+
{ from: '/docs/language', to: '/docs/language/contracts' },
122+
{ from: '/docs/sdk', to: '/docs/sdk/instantiation' },
123+
{ from: '/docs/guides', to: '/docs/guides/covenants' },
124+
{ from: '/docs/getting-started', to: '/docs/basics/getting-started' },
125+
{ from: '/docs/examples', to: '/docs/language/examples' },
126+
],
127+
},
128+
],
116129
],
117130
};

website/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
"deploy": "docusaurus deploy"
1010
},
1111
"dependencies": {
12-
"@docusaurus/core": "^2.0.0-alpha.54",
13-
"@docusaurus/preset-classic": "^2.0.0-alpha.54",
12+
"@docusaurus/core": "^2.0.0-alpha.58",
13+
"@docusaurus/plugin-client-redirects": "^2.0.0-alpha.58",
14+
"@docusaurus/preset-classic": "^2.0.0-alpha.58",
1415
"classnames": "^2.2.6",
1516
"prism-react-renderer": "^1.1.1",
1617
"react": "^16.8.4",

website/src/exports/redirect.js

-8
This file was deleted.

website/src/plugins/redirects/index.js

-35
This file was deleted.

0 commit comments

Comments
 (0)