Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions/checkout@v7

- name: Install Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: current

Expand Down
29 changes: 6 additions & 23 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,6 @@ export default defineConfig({
description: "The open source modular smart mirror platform.",
lang: "en",
ignoreDeadLinks: "localhostLinks",
head: [
[
"script",
{
async: "",
src: "https://www.googletagmanager.com/gtag/js?id=UA-1219071-59",
},
],
[
"script",
{},
`window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'TAG_ID');`,
],
],
sitemap: {
hostname: "https://docs.magicmirror.builders/",
},
Expand Down Expand Up @@ -59,12 +42,12 @@ export default defineConfig({
collapsed: false,
items: [
{ text: "Introduction", link: "/" },
{ text: "Requirements", link: "/getting-started/requirements.md" },
{ text: "Requirements", link: "/getting-started/requirements" },
{
text: "Installation & Usage",
link: "/getting-started/installation.md",
link: "/getting-started/installation",
},
{ text: "Upgrade Guide", link: "/getting-started/upgrade-guide.md" },
{ text: "Upgrade Guide", link: "/getting-started/upgrade-guide" },
],
},
{
Expand Down Expand Up @@ -142,12 +125,12 @@ export default defineConfig({
text: "Core Development",
collapsed: true,
items: [
{ text: "Introduction", link: "/core-development/introduction.md" },
{ text: "Introduction", link: "/core-development/introduction" },
{
text: "Testing",
link: "/core-development/testing.md",
link: "/core-development/testing",
},
{ text: "Debugging", link: "/core-development/debugging.md" },
{ text: "Debugging", link: "/core-development/debugging" },
],
},
{
Expand Down
14 changes: 7 additions & 7 deletions configuration/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<!-- prettier-ignore -->
```js
let config = {
const config = {
modules: [
{
module: "clock",
Expand Down Expand Up @@ -169,7 +169,7 @@ Variables must be inserted as `${MY_VARIABLE}`, examples:
`config.js`:

```js
let config = {
const config = {
address: "${MY_ADDRESS}",
port: ${MY_PORT},
useHttps: ${MY_HTTPS},
Expand All @@ -182,7 +182,7 @@ would be translated to

<!-- prettier-ignore -->
```js
let config = {
const config = {
address: "localhost",
port: 8080,
useHttps: false,
Expand Down Expand Up @@ -233,7 +233,7 @@ You have two 1920x1080 monitors set up in the Pi as sitting next to each other:
To move the pi to the second monitor, use this:

```js
let config = {
const config = {
electronOptions: { x: 1920 },
...
```
Expand Down Expand Up @@ -267,7 +267,7 @@ node --run start
Configuration file 1 (config.js):

```js
let config = {
const config = {
address: "0.0.0.0", // Can be whatever you set as your original.
port: 8080, // Must be different than the other configuration file.
ipWhitelist: [], // Can be whatever you set as your original.
Expand All @@ -288,7 +288,7 @@ if (typeof module !== "undefined") {
Configuration file 2 (config2.js):

```js
let config = {
const config = {
electronOptions: { x: 1920 },
address: "0.0.0.0", // can be whatever you set as your original.
port: 8081, // Must be different than the other configuration file.
Expand Down Expand Up @@ -317,7 +317,7 @@ them from the config.js file.
`config.js`:

```js
let config = {
const config = {
address: "0.0.0.0",
port: 8080,
ipWhitelist: [],
Expand Down
6 changes: 3 additions & 3 deletions configuration/secrets.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ including all secrets, and send it somewhere else.
You have to add new parameters in `config.js`:

```js
let config = {
const config = {
...
hideConfigSecrets: true,
...
Expand All @@ -73,7 +73,7 @@ In this example the 2 parameters are set with 2 normal environment variables
`STRAVA_CLIENT_ID` and `STRAVA_API_KEY`:

```js
let config = {
const config = {
...
hideConfigSecrets: true,
...
Expand Down Expand Up @@ -123,7 +123,7 @@ token in the URL.
Example:

```js
let config = {
const config = {
...
hideConfigSecrets: true,
cors: "allowWhitelist",
Expand Down
4 changes: 2 additions & 2 deletions core-development/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ This mode monitors files specified in your `config.js` under the `watchTargets`
property:

```js
let config = {
const config = {
watchTargets: [
"config/config.js",
"config/custom.css",
Expand Down Expand Up @@ -91,7 +91,7 @@ Debug logging is disabled by default, and can be very verbose. It can be enabled
in the _config/config.js_ file by adding `"DEBUG"` to the `logLevel` key:

```js
let config = {
const config = {
// ...
logLevel: ["INFO", "LOG", "WARN", "ERROR", "DEBUG"], // Add "DEBUG" for even more logging
// ...
Expand Down
2 changes: 1 addition & 1 deletion getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Sample Configuration below
[and link to full configuration options](/configuration/introduction)

```js
let config = {
const config = {
address: "0.0.0.0", // default is "localhost"
port: 8080, // default
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:172.17.0.1"], // default -- need to add your IP here
Expand Down
4 changes: 2 additions & 2 deletions modules/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ see [configuration](/configuration/introduction) for more information.
| `header` | To display a header text above the module, add the header property. This field is optional. |
| `hiddenOnStartup` | Set module as being hidden on startup. This field is optional. |
| `disabled` | Set disabled to `true` to skip creating the module. This field is optional. |
| `configDeepMerge` | Allow to merge with internal configuration in deep (Array and/with object). This field is optional (on developer choice generally). |
| `configDeepMerge` | By default `config` is merged with the module defaults only at the top level. Set to `true` to also merge nested objects recursively (arrays are always replaced). Whether it's useful depends on the module, so check its documentation. Optional, defaults to `false`. |
| `animateIn` | Special animate name when a module appears (see below) This field is optional. |
| `animateOut` | Special animates name when a module should hide (see below) This field is optional. |
| `config` | An object with the module configuration properties. Check the documentation of the module for more information. This field is optional, unless the module requires extra configuration. |

## Example

```js
let config = {
const config = {
modules: [
{
module: "clock",
Expand Down
Loading