Skip to content

Commit 8bbb6fe

Browse files
authored
Merge branch 'live-codes:develop' into develop
2 parents ef91608 + 91797a2 commit 8bbb6fe

129 files changed

Lines changed: 23499 additions & 542 deletions

File tree

Some content is hidden

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

.github/workflows/CI-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
node-version: [18.x]
10+
node-version: [24.x]
1111
env:
12-
NODE_OPTIONS: '--max_old_space_size=4096'
12+
NODE_OPTIONS: "--max_old_space_size=4096"
1313
steps:
1414
- name: Checkout code
1515
uses: actions/checkout@v4
@@ -18,8 +18,8 @@ jobs:
1818
uses: actions/setup-node@v4
1919
with:
2020
node-version: ${{ matrix.node-version }}
21-
cache: 'npm'
22-
cache-dependency-path: '**/package-lock.json'
21+
cache: "npm"
22+
cache-dependency-path: "**/package-lock.json"
2323

2424
- name: Install dependencies
2525
run: npm ci

.github/workflows/CI-e2e.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
node-version: [18.x]
11+
node-version: [24.x]
1212
test: [1, 2, 3, 4, 5]
1313
env:
14-
NODE_OPTIONS: '--max_old_space_size=4096'
14+
NODE_OPTIONS: "--max_old_space_size=4096"
1515
steps:
1616
- name: Checkout code
1717
uses: actions/checkout@v4
@@ -20,8 +20,8 @@ jobs:
2020
uses: actions/setup-node@v4
2121
with:
2222
node-version: ${{ matrix.node-version }}
23-
cache: 'npm'
24-
cache-dependency-path: '**/package-lock.json'
23+
cache: "npm"
24+
cache-dependency-path: "**/package-lock.json"
2525

2626
- name: Install dependencies
2727
run: npm ci

.github/workflows/deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ on:
77
- main
88

99
env:
10-
NODE_VERSION: 18.x
10+
NODE_VERSION: 24.x
1111

1212
jobs:
1313
deploy:
1414
runs-on: ubuntu-latest
1515
env:
16-
NODE_OPTIONS: '--max_old_space_size=4096'
16+
NODE_OPTIONS: "--max_old_space_size=4096"
1717
steps:
1818
- name: Generate Github Token for CI Bot
1919
uses: actions/create-github-app-token@v1
@@ -31,8 +31,8 @@ jobs:
3131
uses: actions/setup-node@v4
3232
with:
3333
node-version: ${{ env.NODE_VERSION }}
34-
cache: 'npm'
35-
cache-dependency-path: '**/package-lock.json'
34+
cache: "npm"
35+
cache-dependency-path: "**/package-lock.json"
3636

3737
- name: Install dependencies
3838
run: npm ci

.github/workflows/i18n-update-pull.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
env:
88
LOKALISE_PROJECT_ID: ${{ vars.LOKALISE_PROJECT_ID }}
99
LOKALISE_API_TOKEN: ${{ secrets.LOKALISE_API_TOKEN }}
10-
NODE_VERSION: 18.x
10+
NODE_VERSION: 24.x
1111
CI: true
1212

1313
jobs:
@@ -91,8 +91,8 @@ jobs:
9191
uses: actions/setup-node@v4
9292
with:
9393
node-version: ${{ env.NODE_VERSION }}
94-
cache: 'npm'
95-
cache-dependency-path: '**/package-lock.json'
94+
cache: "npm"
95+
cache-dependency-path: "**/package-lock.json"
9696

9797
- name: Install dependencies
9898
run: npm ci

.github/workflows/i18n-update-push.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
env:
88
LOKALISE_PROJECT_ID: ${{ vars.LOKALISE_PROJECT_ID }}
99
LOKALISE_API_TOKEN: ${{ secrets.LOKALISE_API_TOKEN }}
10-
NODE_VERSION: 18.x
10+
NODE_VERSION: 24.x
1111
CI: true
1212

1313
jobs:
@@ -91,8 +91,8 @@ jobs:
9191
uses: actions/setup-node@v4
9292
with:
9393
node-version: ${{ env.NODE_VERSION }}
94-
cache: 'npm'
95-
cache-dependency-path: '**/package-lock.json'
94+
cache: "npm"
95+
cache-dependency-path: "**/package-lock.json"
9696

9797
- name: Install dependencies
9898
run: npm ci
@@ -136,7 +136,7 @@ jobs:
136136
| **New Branch for i18n** | [\`${process.env.NEW_BRANCH}\`](${branchURL}) |
137137
| **Last Commit SHA** | ${process.env.LAST_COMMIT_SHA} |
138138
139-
Maintainers can comment \`.i18n-update-pull\` after translation is done to trigger the i18n pull workflow and pull the changes back to Github.
139+
Maintainers can comment \`.i18n-update-pull\` after translation is done to trigger the i18n pull workflow and pull the changes back to Github.
140140
`;
141141
142142
github.rest.issues.createComment({

.github/workflows/i18n-update-scheduled.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: i18n-update-scheduled
55

66
on:
77
schedule:
8-
- cron: '0 0 * * 0'
8+
- cron: "0 0 * * 0"
99
push:
1010
branches:
1111
- develop
@@ -16,7 +16,7 @@ env:
1616
LOKALISE_API_TOKEN: ${{ secrets.LOKALISE_API_TOKEN }}
1717
BRANCH: i18n/develop
1818
LOKALISE_BRANCH: master
19-
NODE_VERSION: 18.x
19+
NODE_VERSION: 24.x
2020
CI: true
2121

2222
jobs:
@@ -55,8 +55,8 @@ jobs:
5555
uses: actions/setup-node@v4
5656
with:
5757
node-version: ${{ env.NODE_VERSION }}
58-
cache: 'npm'
59-
cache-dependency-path: '**/package-lock.json'
58+
cache: "npm"
59+
cache-dependency-path: "**/package-lock.json"
6060

6161
- name: Install dependencies
6262
run: npm ci

.github/workflows/release.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,19 @@ on:
66
- develop
77
types: [closed]
88

9+
permissions:
10+
id-token: write # Required for OIDC
11+
contents: write
12+
913
env:
10-
NODE_VERSION: 18.x
14+
NODE_VERSION: 24.x
1115

1216
jobs:
1317
release:
1418
runs-on: ubuntu-latest
1519
if: github.event.pull_request.merged && startsWith(github.head_ref, 'releases/')
1620
env:
17-
NODE_OPTIONS: '--max_old_space_size=4096'
21+
NODE_OPTIONS: "--max_old_space_size=4096"
1822
steps:
1923
- name: Generate Github Token for CI Bot
2024
uses: actions/create-github-app-token@v1
@@ -36,8 +40,12 @@ jobs:
3640
uses: actions/setup-node@v4
3741
with:
3842
node-version: ${{ env.NODE_VERSION }}
39-
cache: 'npm'
40-
cache-dependency-path: '**/package-lock.json'
43+
cache: "npm"
44+
cache-dependency-path: "**/package-lock.json"
45+
46+
# Ensure npm 11.5.1 or later is installed (for OIDC)
47+
- name: Update npm
48+
run: npm install -g npm@11.6.4
4149

4250
- name: Install dependencies
4351
run: npm ci
@@ -91,12 +99,8 @@ jobs:
9199

92100
- name: Publish SDK to NPM
93101
if: startsWith(github.head_ref, 'releases/sdk-v')
94-
run: |
95-
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
96-
npm publish --access=public
97102
working-directory: ./build/sdk
98-
env:
99-
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
103+
run: npm publish --access=public
100104

101105
- name: Create pull request to main (App)
102106
if: startsWith(github.head_ref, 'releases/v')

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A [feature-rich](https://livecodes.io/docs/features/), open-source, **client-sid
1313
[![LiveCodes: npm version](https://img.shields.io/npm/v/livecodes)](https://www.npmjs.com/package/livecodes)
1414
[![LiveCodes: npm downloads](https://img.shields.io/npm/dm/livecodes)](https://www.npmjs.com/package/livecodes)
1515
[![LiveCodes: jsdelivr downloads](https://data.jsdelivr.com/v1/package/npm/livecodes/badge?style=rounded)](https://www.jsdelivr.com/package/npm/livecodes)
16-
[![LiveCodes: languages](https://img.shields.io/badge/languages-97-blue)](https://livecodes.io/docs/languages/)
16+
[![LiveCodes: languages](https://img.shields.io/badge/languages-98-blue)](https://livecodes.io/docs/languages/)
1717
[![LiveCodes: docs](https://img.shields.io/badge/Documentation-575757?logo=gitbook&logoColor=white)](https://livecodes.io/docs/)
1818
[![LiveCodes: llms.txt](https://img.shields.io/badge/llms.txt-575757?logo=googledocs&logoColor=white)](https://livecodes.io/docs/llms.txt)
1919
[![LiveCodes: llms-full.txt](https://img.shields.io/badge/llms--full.txt-575757?logo=googledocs&logoColor=white)](https://livecodes.io/docs/llms-full.txt)

docs/docs/languages/astro.mdx

Lines changed: 105 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,107 @@
11
# Astro
22

3-
TODO...
3+
Astro is a modern static site builder focused on delivering fast, content-driven websites. It uses a “zero JavaScript by default” approach and supports multiple frameworks like React, Vue, and Svelte through an islands architecture.
4+
5+
## Usage
6+
7+
There are **two primary modes** for building and rendering Astro pages:
8+
9+
### Static (Default)
10+
11+
In this mode, pages are fully pre-rendered at build time.
12+
All data must be available during the build process and can be supplied through **frontmatter**, **data fetching functions**, or **integrations**.
13+
14+
**Example:** Provide data to a page using frontmatter.
15+
16+
```astro
17+
---
18+
const name = "LiveCodes";
19+
---
20+
<h1>Hello {name}!</h1>
21+
```
22+
23+
---
24+
25+
### Dynamic
26+
27+
To enable runtime rendering, configure the page as a server-rendered route or use an Astro server adapter (e.g., Node, Deno, or Vercel).
28+
29+
In this mode, values can be provided dynamically during request handling.
30+
31+
**Example:** Create a server-side API endpoint:
32+
33+
```js
34+
export async function GET() {
35+
return new Response(JSON.stringify({ name: 'LiveCodes' }), {
36+
headers: { 'Content-Type': 'application/json' },
37+
});
38+
}
39+
```
40+
41+
Then fetch and render it dynamically in Astro:
42+
43+
```astro
44+
---
45+
const res = await fetch('https://jsonplaceholder.typicode.com/users/1');
46+
const data = await res.json();
47+
---
48+
<h1>Hello {data.name}!</h1>
49+
```
50+
51+
---
52+
53+
## Language Info
54+
55+
### Name
56+
57+
`astro`
58+
59+
### Extension
60+
61+
`astro`
62+
63+
## Editor
64+
65+
`markup`
66+
67+
## Compiler
68+
69+
Astro compiler
70+
71+
### Version
72+
73+
`@astrojs/compiler`: `v2.2.8`
74+
75+
## Code Formatting
76+
77+
Using [Prettier](https://prettier.io/).
78+
79+
---
80+
81+
## Example Usage
82+
83+
### Static Example
84+
85+
```astro
86+
---
87+
const message = "Hello from Astro!";
88+
---
89+
<p>{message}</p>
90+
```
91+
92+
### Dynamic Example
93+
94+
```astro
95+
---
96+
const res = await fetch('https://api.example.com/data');
97+
const data = await res.json();
98+
---
99+
<p>{data.title}</p>
100+
```
101+
102+
## Links
103+
104+
- [Astro Documentation](https://docs.astro.build)
105+
- [Astro Starter Template](https://livecodes.io/?template=astro)
106+
107+

docs/docs/languages/bbcode.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
### Version
2424

25-
`BBob`: v3.0.2
25+
`BBob`: v4.3.1
2626

2727
## Example Usage
2828

0 commit comments

Comments
 (0)