Skip to content

Commit 6015649

Browse files
dennisreimannConorOkus
and
ConorOkus
authored
Vuepress migration (#85)
* Migrate to Vuepress (#46) * Migrate to Vuepress * Styling updates * Format titles for Vuepress * Add navigation sidebar * Improve sidebar styling * Ignore linkcheck failures for now * Remove introduction from homepage * Style improvements * Wording and content modifications * Add favicon files * Upgrade dependencies * Decrease sidebar depth * Fix logo in Firefox * Set selection styles * Minor style fixes * Attempt to fix font issue * Import Manrope from Google Fonts * Don't show headings in sidebar * Add blog * Update blog sidebar * Add pitch points to homepage * Homepage style tweaks * Fix blog article sidebar * Add card image * Improve 404 page * Component improvements * Add footer Closes #61 * Add features to homepage Closes #62 * Update feature list on homepage * Fix after rebase * Fix theme switch icon size on iOS * Stylus fixes * Upgrade dependencies * Update theme colors Closes #60 * Restructure sidebar nav for docs pages * Create different sidebar for tutorial page, break some docs up into new pages * Styling updates * Fix tab behaviour Closes #72 * Fix note * Updates features section copy * Remove overview page from footer * Add copy for high performance & compact feature * Include Electrum explicitly * Remove doc deep links temporarily * Include IoT and PoS devices * Shorten copy * Decrease sidebar width * Update logo * Update colors and logo * Update ignore file * Add footnote plugin * Improve iframe integration * Remove BDK blog posts * Extract theme * Fix body bg color * Update theme and variables * Upgrade dependencies * Update theme * Update tagline * Fixes broken links * Blog coming soon * Update footer link * Update code and note colors * Fix links * Add SEO config * Update favicon * Copy updates Co-authored-by: ConorOkus <[email protected]>
1 parent eecbcad commit 6015649

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+31155
-11241
lines changed

.github/workflows/build.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build
2+
3+
on:
4+
# Run the build for pushes and pull requests targeting main
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
branches:
10+
- main
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
node-version: [16]
18+
19+
steps:
20+
# Checkout doc repo and its dependencies
21+
- name: Checkout
22+
uses: actions/checkout@v2
23+
# Setup Node
24+
- name: Setup (Node.js ${{ matrix.node-version }})
25+
uses: actions/setup-node@v1
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
# Install and build
29+
- name: Install
30+
run: npm ci
31+
- name: Build
32+
run: npm run build
33+
# Deploy, limited to the main branch
34+
- name: Deploy
35+
if: success() && github.ref == 'refs/heads/main'
36+
uses: peaceiris/actions-gh-pages@v3
37+
with:
38+
publish_dir: ./docs/.vuepress/dist
39+
github_token: ${{ secrets.GITHUB_TOKEN }}
40+
cname: lightningdevkit.org
41+
user_name: 'github-actions[bot]'
42+
user_email: 'github-actions[bot]@users.noreply.github.com'
43+
# Run linkcheck, propagate linkcheck failure through grep pipe
44+
- name: Linkcheck
45+
run: set -o pipefail; npm run linkcheck 2>/dev/null | grep "Getting links from\|BROKEN"
46+
continue-on-error: true

.gitignore

+1-7
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
/node_modules
33

44
# Production
5-
/build
6-
7-
# Generated files
8-
.docusaurus
9-
.cache-loader
5+
/docs/.vuepress/dist
106

117
# Misc
128
.DS_Store
@@ -16,5 +12,3 @@
1612
.env.production.local
1713

1814
npm-debug.log*
19-
yarn-debug.log*
20-
yarn-error.log*

README.md

+65-17
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,81 @@
1-
# Website
1+
# Lightning Dev Kit Documentation
22

3-
This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.
3+
[![Build Status](https://github.com/lightningdevkit/lightningdevkit.org/workflows/Build/badge.svg)](https://github.com/lightningdevkit/lightningdevkit.org/actions?query=workflow%3A%22Build%22)
44

5-
## Installation
5+
### Build the Documentation Locally
66

7-
```console
8-
yarn install
7+
In order to build the website locally, you'll need [Node.js](https://nodejs.org/) >= 14.16 (or basically the latest LTS version).
8+
9+
The setup is straight forward:
10+
11+
```bash
12+
# Install dependencies
13+
npm install
14+
15+
# Serve locally (by default on port 8080)
16+
npm start
917
```
1018

11-
## Local Development
19+
### Text Highlights
20+
21+
There are [three types of text highlights](https://vuepress.vuejs.org/guide/markdown.html#custom-containers) that can be used to display different colored boxes.
1222

13-
```console
14-
yarn start
23+
A green box displaying a friendly tip:
24+
25+
```md
26+
:::tip
27+
foo
28+
:::
1529
```
1630

17-
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
31+
A yellow box with a cautious warning:
32+
33+
```md
34+
:::warning
35+
foo
36+
:::
37+
```
1838

19-
## Build
39+
A red box with a clear danger, you can also add a title `foo` to any container:
2040

21-
```console
22-
yarn build
41+
```md
42+
:::danger foo
43+
bar
44+
:::
2345
```
2446

25-
This command generates static content into the `build` directory and can be served using any static contents hosting service.
47+
### SEO improvements
48+
49+
We are using the [Vuepress SEO plugin](https://www.npmjs.com/package/vuepress-plugin-seo) to add relevant meta tags to the site and individual pages.
2650

27-
## Deployment
51+
To improve the meta attributes of a specific page, you can add them as YAML frontmatter like this: (see the WooCommerce page for an example)
2852

29-
```console
30-
GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
53+
```text
54+
---
55+
description: How to integrate LDK
56+
tags:
57+
- WooCommerce
58+
- WordPress
59+
- Plugin
60+
- eCommerce
61+
---
62+
# LDK integration
63+
64+
This document explains how to **integrate LDK into your stack**.
3165
```
3266

33-
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
67+
### Embedding YouTube videos
68+
69+
To add a YouTube video with a preview, you can so so by linking to it like this:
70+
71+
```md
72+
[![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/mqdefault.jpg)](https://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE)
73+
```
74+
75+
Note that the link item need to be a preview image (either from YouTube or a custom one) to result in an embedded video.
76+
77+
### Check for broken links
78+
79+
The GitHub Actions pipeline checks for broken links after deploying the production site.
80+
You can also run the link check locally using `npm run linkcheck:local`.
81+
The dev server needs to be running alongside for this to work.

babel.config.js

-3
This file was deleted.

docs/.vuepress/config.js

+154
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
const { resolve } = require('path')
2+
const themeConfig = require('squarecrypto-vuepress-devkit-theme/config')
3+
4+
const title = 'Lightning Dev Kit Documentation'
5+
const baseUrl = 'https://lightningdevkit.org'
6+
const githubUrl = 'https://github.com/lightningdevkit'
7+
const slackUrl = 'https://join.slack.com/t/lightningdevkit/shared_invite/zt-tte36cb7-r5f41MDn3ObFtDu~N9dCrQ'
8+
const themeColor = '#ffffff'
9+
10+
const docsSidebar = [
11+
{
12+
title: 'Documentation',
13+
collapsable: false,
14+
children: [
15+
'/getting-started',
16+
{
17+
title: 'Basic Features',
18+
collapsable: true,
19+
children: [
20+
['/basic-features/key_management', 'Key management'],
21+
['/basic-features/blockchain_data', 'Blockchain data'],
22+
['/basic-features/connecting_peers', 'Connecting peers'],
23+
['/basic-features/managing_channels', 'Managing channels'],
24+
['/basic-features/sending_payments', 'Sending payments'],
25+
['/basic-features/receiving_payments', 'Receiving Payments']
26+
]
27+
},
28+
'/examples',
29+
'/batteries',
30+
'/architecture',
31+
'/use_cases',
32+
]
33+
},
34+
{
35+
title: 'API Reference',
36+
collapsable: false,
37+
children: [
38+
['https://docs.rs/lightning/0.0.99/lightning/', 'Rust'],
39+
['https://github.com/arik-so/SwiftLightning/tree/master/Documentation', 'Swift']
40+
],
41+
}
42+
]
43+
44+
const tutorialSidebar = [
45+
{
46+
title: 'Tutorials',
47+
collapsable: false,
48+
children: [
49+
'/tutorials/build_a_node_in_java',
50+
'/tutorials/build_a_node_in_rust'
51+
],
52+
}
53+
]
54+
55+
const blogSidebar = [
56+
{
57+
title: 'Blog',
58+
collapsable: false,
59+
children: [
60+
['/blog/', 'Articles'],
61+
['/blog/tags/', 'Tags'],
62+
['/blog/author/', 'Authors']
63+
]
64+
}
65+
]
66+
67+
module.exports = {
68+
title,
69+
description: 'LDK is a flexible lightning implementation with supporting batteries (or modules).',
70+
theme: resolve(__dirname, '../../node_modules/squarecrypto-vuepress-devkit-theme'),
71+
...themeConfig({
72+
baseUrl,
73+
title,
74+
themeColor,
75+
tags: ['Bitcoin', 'Lightning', 'LDK', 'Lightning Dev Kit', 'Documentation']
76+
}),
77+
themeConfig: {
78+
domain: baseUrl,
79+
logo: '/img/logo.svg',
80+
displayAllHeaders: false,
81+
repo: 'lightningdevkit/lightningdevkit.org',
82+
docsDir: 'docs',
83+
editLinks: true,
84+
sidebarDepth: 0,
85+
nav: [
86+
{
87+
text: 'Docs',
88+
link: '/getting-started/'
89+
},
90+
{
91+
text: 'Tutorials',
92+
link: '/tutorials/build_a_node_in_java'
93+
},
94+
{
95+
text: 'Blog',
96+
link: '/blog/'
97+
},
98+
{
99+
text: 'Slack',
100+
link: slackUrl,
101+
rel: 'noopener noreferrer'
102+
},
103+
{
104+
text: 'GitHub',
105+
link: githubUrl,
106+
rel: 'noopener noreferrer'
107+
}
108+
],
109+
sidebar: {
110+
'/_blog/': blogSidebar,
111+
'/blog/': blogSidebar,
112+
'/tutorials/': tutorialSidebar,
113+
'/': docsSidebar,
114+
},
115+
footer: {
116+
links: [
117+
{
118+
title: 'Docs',
119+
children: [
120+
{
121+
text: 'Getting Started',
122+
link: '/getting-started/'
123+
}
124+
]
125+
},
126+
{
127+
title: 'Community',
128+
children: [
129+
{
130+
text: 'Slack',
131+
link: slackUrl,
132+
rel: 'noopener noreferrer'
133+
},
134+
{
135+
text: 'GitHub',
136+
link: githubUrl,
137+
rel: 'noopener noreferrer'
138+
}
139+
]
140+
},
141+
{
142+
title: 'More',
143+
children: [
144+
{
145+
text: 'Blog',
146+
link: '/blog/'
147+
}
148+
]
149+
}
150+
],
151+
copyright: 'Copyright © 2021 LDK Developers'
152+
}
153+
}
154+
}
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<browserconfig>
3+
<msapplication>
4+
<tile>
5+
<square150x150logo src="/img/favicon/mstile-150x150.png"/>
6+
<TileColor>#ffffff</TileColor>
7+
</tile>
8+
</msapplication>
9+
</browserconfig>

docs/.vuepress/public/card.png

27.2 KB
Loading
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
:root {
2+
--docs-primary-light: #0F31F7;
3+
--docs-primary-dark: #76F3CD;
4+
--docs-dark: #000628;
5+
6+
--docs-note-text: var(--docs-white) !important;
7+
--docs-code-bg: #E6EAFE;
8+
--docs-pre-bg: #020A36;
9+
}
10+
11+
:root[data-theme="dark"] {
12+
--docs-code-bg: #06463C;
13+
--docs-pre-bg: #002547;
14+
}
15+
16+
@media (prefers-color-scheme: dark) {
17+
:root:not([data-theme]) {
18+
--docs-code-bg: #06463C;
19+
--docs-pre-bg: #002547;
20+
}
21+
}

docs/.vuepress/public/favicon.ico

14.7 KB
Binary file not shown.
Binary file not shown.

docs/.vuepress/public/img/border.svg

+1
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
985 Bytes
Loading
Loading

docs/.vuepress/public/img/logo.svg

+16
Loading

0 commit comments

Comments
 (0)