Skip to content

Commit 7ba34bf

Browse files
committed
add packages
1 parent 4712fe5 commit 7ba34bf

43 files changed

Lines changed: 471 additions & 1715 deletions

Some content is hidden

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

.github/workflows/deploy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
uses: actions/checkout@v5
3333
with:
3434
fetch-depth: 0 # Not needed if lastUpdated is not enabled
35+
submodules: 'recursive' # Fetch lime-packages and network-profiles
3536
- uses: pnpm/action-setup@v4 # Uncomment this block if you're using pnpm
3637
with:
3738
version: 9 # Not needed if you've set "packageManager" in package.json
@@ -45,6 +46,8 @@ jobs:
4546
uses: actions/configure-pages@v4
4647
- name: Install dependencies
4748
run: pnpm install # or pnpm install / yarn install / bun install
49+
- name: Prebuild with VitePress
50+
run: pnpm run prebuild # or pnpm docs:build / yarn docs:build / bun run docs:build
4851
- name: Build with VitePress
4952
run: pnpm run build # or pnpm docs:build / yarn docs:build / bun run docs:build
5053
- name: Upload artifact

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ dist
33
temp
44

55
node_modules/
6+
/docs/packages/**
7+
!/docs/packages/index.md
8+
9+
/lime-packages
10+
/network-profiles

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[submodule "lime-packages"]
2+
path = lime-packages
3+
url = https://github.com/libremesh/lime-packages
4+
[submodule "network-profiles"]
5+
path = network-profiles
6+
url = https://github.com/libremesh/network-profiles

docs/.vitepress/config.mts

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const libremesh = {
1111
oldstable_branch_openwrt: ['19.07'],
1212
}
1313

14-
const packages = await getFiles('docs/packages/*.md'); // Path to folder
14+
const packages = await getFiles('docs/packages/*/index.md'); // Path to folder
1515

1616
// https://vitepress.dev/reference/site-config
1717
export default defineConfig({
@@ -29,6 +29,13 @@ export default defineConfig({
2929
},
3030
},
3131

32+
rewrites: {
33+
// ':page*': 'docs/:page*',
34+
// 'packages/pkg-a/src/foo.md': 'pkg-a/foo.md',
35+
// 'packages/pkg-b/src/index.md': 'pkg-b/index.md',
36+
// 'packages/pkg-b/src/bar.md': 'pkg-b/bar.md'
37+
},
38+
3239
themeConfig: {
3340
// https://vitepress.dev/reference/default-theme-config
3441
logo: { light: '/libremesh_logo.svg', dark: '/libremesh_logo.svg', alt: 'Logo' },
@@ -92,29 +99,29 @@ function sidebarGuide(): DefaultTheme.SidebarItem[] {
9299
text: 'User Guide',
93100
collapsed: false,
94101
items: [
95-
{ text: 'Connecting to the router', link: '/install/connecting' },
102+
{ text: 'Connecting to the router', link: '/guide/connecting' },
96103
{ text: 'Packages selection',
97-
link: '/install/packages-selection',
104+
link: '/guide/packages-selection',
98105
collapsed: true,
99106
items: [
100-
{ text: 'Build customization', link: '/install/packages-selection' },
101-
{ text: 'Network Profiles', link: '/install/network-profiles' }
107+
{ text: 'Build customization', link: '/guide/packages-selection' },
108+
{ text: 'Network Profiles', link: '/guide/network-profiles' }
102109
] },
103110
{ text: 'Build LibreMesh',
104111
link: '/build',
105112
collapsed: true,
106113
items: [
107114
{ text: 'Build methods', link: '/build/' },
108115
{ text: 'Imagebuilder', link: '/build/imagebuilder' },
109-
{ text: 'Buildroot', link: '/build/buildroot/debian'}
116+
{ text: 'Buildroot', link: '/build/buildroot'}
110117
]}
111118
]
112119
},
113120
{
114121
text: 'Developer Guide',
115122
collapsed: false,
116123
items: [
117-
{ text: 'Run it on QEMU', link: '/install/qemu' }
124+
{ text: 'Run it on QEMU', link: '/guide/qemu' }
118125
]
119126
},
120127
{
@@ -145,8 +152,8 @@ function sidebarGuide(): DefaultTheme.SidebarItem[] {
145152
},
146153
{
147154
text: 'Packages',
148-
collapsed: false,
149-
link: '/resources',
155+
collapsed: true,
156+
link: '/packages',
150157
items: generateSidebarItems(packages),
151158
},
152159
]

docs/.vitepress/sidebar.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ export function getFiles(path: string): Promise<INavItem[]> {
1717
return new Promise((resolve, reject) => {
1818
let navigation: INavItem[] = [];
1919
const filePath = path;
20+
console.log(path)
2021
const files: string[] = glob.sync(filePath);
22+
console.log(files)
2123
files.sort();
2224
for (const file of files) {
25+
console.log(file)
2326
const fileData = fs.readFileSync(file).toString();
2427
const fm = matter(fileData);
2528

@@ -28,6 +31,8 @@ export function getFiles(path: string): Promise<INavItem[]> {
2831
title = file;
2932
}
3033

34+
console.log(title)
35+
3136
navigation.push({
3237
title,
3338
id: fm.data.id, // Custom data
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<script setup>
2+
import DefaultTheme from 'vitepress/theme'
3+
4+
const { Layout } = DefaultTheme
5+
</script>
6+
7+
<template>
8+
<div v-if="frontmatter.home">
9+
<h1>{{ site.title }}</h1>
10+
<p>{{ site.description }}</p>
11+
<!-- <ul>
12+
<li><a href="/markdown-examples.html">Markdown Examples</a></li>
13+
<li><a href="/api-examples.html">API Examples</a></li>
14+
</ul> -->
15+
</div>
16+
<div v-else>
17+
<a href="/">Home</a>
18+
<Content />
19+
</div>
20+
</template>

docs/.vitepress/theme/index.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,33 @@ import { h } from 'vue'
33
import type { Theme } from 'vitepress'
44
import DefaultTheme from 'vitepress/theme'
55
import './style.css'
6+
import { redirects } from './redirects'
7+
import LayoutWide from './LayoutWide.vue'
68

79
export default {
810
extends: DefaultTheme,
911
Layout: () => {
1012
return h(DefaultTheme.Layout, null, {
1113
// https://vitepress.dev/guide/extending-default-theme#layout-slots
14+
'wide': () => h(LayoutWide)
1215
})
1316
},
1417
enhanceApp({ app, router, siteData }) {
15-
// ...
18+
19+
// add layout
20+
app.component('wide', LayoutWide)
21+
22+
// preserve old links
23+
router.onBeforeRouteChange = (to: string) => {
24+
const path = to.replace(/\.html$/i, ''),
25+
toPath = redirects[path];
26+
27+
if (toPath) {
28+
setTimeout(() => { router.go(toPath); })
29+
return false;
30+
} else {
31+
return true;
32+
}
33+
}
1634
}
1735
} satisfies Theme

docs/.vitepress/theme/redirects.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// .vitepress/theme/redirects.ts
2+
3+
export const redirects = {
4+
// '/path/from': '/path/to',
5+
'/development': '/build/buildroot',
6+
'/howitworks': '/what-is-libremesh',
7+
'/docs/en_quick_starting_guide': '/getting-started',
8+
'/docs/en_connecting_nodes': '/guide/connecting',
9+
'/development-network_profiles': '/profiles'
10+
}
Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1+
---
2+
aside: false
3+
---
4+
15
<script setup>
26
import { data as openwrt } from '/openwrt.data.js'
37
</script>
48

59
# Buildroot
610

11+
[[toc]]
12+
713
## Build system setup
814
Refers to the OpenWrt wiki [Build system setup](https://openwrt.org/docs/guide-developer/toolchain/install-buildsystem)
915
for the package list of other Linux distributions.
@@ -77,7 +83,7 @@ make menuconfig
7783

7884

7985

80-
Check out the +target+ (e.g. +ATH79+), +subtarget+ (e.g. +generic+) and +profile+ (e.g. +tl-wdr3600-v1+) of your router on https://openwrt.org/toh/start[OpenWrt table of hardware].
86+
Check out the +target+ (e.g. +ATH79+), +subtarget+ (e.g. +generic+) and +profile+ (e.g. +tl-wdr3600-v1+) of your router on [OpenWrt table of hardware](https://openwrt.org/toh/start).
8187

8288
Select the _Target System_, _Subtarget_ and _Target Profile_ accordingly.
8389

@@ -95,15 +101,14 @@ Select the _Target System_, _Subtarget_ and _Target Profile_ accordingly.
95101
Optionally, **deselect** unused packages:
96102
- Network -> ppp
97103

98-
If you local community has a profile in the https://github.com/libremesh/network-profiles/[network-profiles repository], you can select it in:
104+
If you local community has a profile in the [network-profiles repository](https://github.com/libremesh/network-profiles/), you can select it in:
99105

100106
- LibreMesh -> network-profile -> profile-your_community-your_profile
101107

102-
[NOTE]
103-
=========================
108+
::: tip NOTE
104109
Network profiles are the specific configuration from the communities, and are stored in this collective
105-
https://github.com/libremesh/network-profiles/[repository], but they can also be kept locally, depending on how every community network manages itself. For more instructions on how to create a profile or how to use a local one, check out the link:development-network_profiles.html[network profiles page].
106-
=========================
110+
[repository](https://github.com/libremesh/network-profiles/), but they can also be kept locally, depending on how every community network manages itself. For more instructions on how to create a profile or how to use a local one, check out the [network profiles page](../guide/network-profiles).
111+
:::
107112

108113
**Select** (press space until when an asterisk appears, like `<*>`) LibreMesh packages:
109114

@@ -119,10 +124,9 @@ https://github.com/libremesh/network-profiles/[repository], but they can also be
119124
** shared-state-nodes_and_links (nodes_and_links module for shared-state)
120125
* LibreMesh -> babeld-auto-gw-mode
121126

122-
[NOTE]
123-
=========================
124-
If after the compilation you don't see the compiled image in the `bin/targets/.../.../` folder, it is possible that your router has such a small flash memory that the aforementioed packages don't fit in it (it can happen also with routers having 8 MB of flash memory when selecting huge packages to be included). In this case, you can remove the `.config` generated packages list and repeat the packages selection without including `lime-app`. If the compiled image is still too large, try selecting only `lime-proto-anygw`, `lime-proto-batadv` and `lime-proto-babeld` or following https://openwrt.org/docs/guide-user/additional-software/saving_space[this guide].
125-
=========================
127+
::: tip NOTE
128+
If after the compilation you don't see the compiled image in the `bin/targets/.../.../` folder, it is possible that your router has such a small flash memory that the aforementioed packages don't fit in it (it can happen also with routers having 8 MB of flash memory when selecting huge packages to be included). In this case, you can remove the `.config` generated packages list and repeat the packages selection without including `lime-app`. If the compiled image is still too large, try selecting only `lime-proto-anygw`, `lime-proto-batadv` and `lime-proto-babeld` or following [this guide](https://openwrt.org/docs/guide-user/additional-software/saving_space).
129+
:::
126130

127131
Some more packages are recommended but not mandatory for a working LibreMesh network. Consider avoiding to select the following packages _only_ if the created image is too large and does not fit in the router memory.
128132

@@ -142,40 +146,37 @@ and this to be **de**-selected:
142146

143147
- Network -> WirelessAPD -> wpad-basic-mbedtls
144148

145-
[NOTE]
146-
=========================
149+
::: tip NOTE
147150
In order to have additional packages, the easiest way is to select them in menuconfig. More packages can be installed afterwards via +opkg+, but some of these require a specific kernel configuration to be in place. This can be achieved following link:development-kernel_vermagic.html[these additional instructions dealing with kernel vermagic]. Beware that this will increase noticeably the time and storage space required for the compilation.
148-
=========================
151+
:::
149152

150153
Save and exit.
151154

152155
At this stage there is the possibility to include custom files in the compiled firmware image. For this, you will have to create, inside the `openwrt/` directory, a `files/` directory containing the directory structure and files you want to add. For example, if you want to have a `/etc/config/lime-community` file you need to do the following:
153156

154-
-----------------------------
157+
``` sh
155158
mkdir -p files/etc/config/
156159
touch files/etc/config/lime-community
157-
-----------------------------
160+
```
158161

159-
and then edit the newly created `lime-community` file including your custom content. If a file from a package has the same name and path as a file in this directory, it will be overwritten. This is a quick way to include a custom configuration file, without the need to create an online link:development-network_profiles.html[network profile].
162+
and then edit the newly created `lime-community` file including your custom content. If a file from a package has the same name and path as a file in this directory, it will be overwritten. This is a quick way to include a custom configuration file, without the need to create an online [network profile](../guide/network-profiles).
160163

161164
.Finally, compile the images
162-
--------------------------------------------------------------------------------
165+
``` sh
163166
make -j$(nproc)
164-
--------------------------------------------------------------------------------
167+
```
165168

166169
If everything goes well you should find the produced binaries inside the +bin/+ directory.
167170

168171
== Emulating on your computer with qemu
169172

170-
Its possible to emulate a image compiled for x86_64 architecture. See link:https://github.com/libremesh/lime-packages/tree/master/tools[script] qemu_dev_start.sh and qemu_dev_stop.sh scripts.
173+
Its possible to emulate a image compiled for x86_64 architecture. See [script](https://github.com/libremesh/lime-packages/tree/master/tools) qemu_dev_start.sh and qemu_dev_stop.sh scripts.
171174

172-
[NOTE]
173-
=========================
175+
::: tip NOTE
174176
You will be running something like:
175-
```
177+
``` sh
176178
sudo ./qemu_dev_start openwrt-x86-64-combined-ext4.img openwrt-x86-64-ramfs.bzImage
177179
```
178-
More information link:https://github.com/libremesh/lime-packages/blob/master/TESTING.md[here]
179-
180-
=========================
180+
More information in [TESTING.md](https://github.com/libremesh/lime-packages/blob/master/TESTING.md)
181181

182+
:::

docs/build/imagebuilder.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ aside: false
44

55
<script setup>
66
import { data as openwrt } from '/openwrt.data.js'
7-
import { data as packages } from '/packages.data.js'
7+
// import { data as packages } from '/packages.data.js'
88

99
// console.log(packages)
1010
openwrt.stable_branch = openwrt.stable_version.substr(0,5)
@@ -32,6 +32,8 @@ const build = {
3232

3333
# ImageBuilder
3434

35+
[[toc]]
36+
3537
Refers to the OpenWrt wiki [Using the Image Builder](https://openwrt.org/docs/guide-user/additional-software/imagebuilder)
3638
for detailed options
3739

@@ -187,7 +189,7 @@ EOF
187189

188190
## Custom files
189191
Ideally add your own `lime-community` files within the container in the folder `./files/etc/config/`.
190-
To find all possible options consult the [lime-example][lime-example] file.
192+
To find all possible options consult the [`Configuration`][/reference/configuration] page.
191193

192194
Now create an image of your choice, to see the names of supported profiles run
193195
`make info` first.
@@ -211,7 +213,7 @@ make image \
211213

212214
### Build using Network Profiles
213215

214-
Refers to [Network Profiles](/install/network-profiles)
216+
Refers to [Network Profiles](/guide/network-profiles)
215217

216218
```sh
217219
make image \

0 commit comments

Comments
 (0)