Skip to content

Commit e58f612

Browse files
Merge branch 'ronith/overriding-footer' of https://github.com/stackblitz/tutorialkit into ronith/overriding-footer
2 parents 09903b3 + 257871c commit e58f612

File tree

30 files changed

+313
-216
lines changed

30 files changed

+313
-216
lines changed

.github/workflows/publish-commit.yaml

Lines changed: 11 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,30 @@
1-
# PRs can be published by commenting `/pkg-pr-new` in the PR
1+
# PRs can be published by adding `pkg-pr-new` tag
22

3-
name: Publish Any Commit
3+
name: PR Preview Releases
44

55
on:
6-
issue_comment:
7-
types: [created]
6+
push:
7+
branches: [main]
8+
pull_request:
9+
types: [opened, synchronize, labeled]
810

911
jobs:
10-
build:
11-
if: github.repository == 'stackblitz/tutorialkit' && (github.event_name == 'push' || github.event.issue.pull_request && startsWith(github.event.comment.body, '/pkg-pr-new'))
12+
release:
13+
if: github.repository == 'stackblitz/tutorialkit' && (github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'pkg-pr-new'))
1214
runs-on: ubuntu-latest
15+
name: 'Release: pkg.pr.new'
1316

1417
steps:
15-
- if: github.event.issue.pull_request
16-
uses: actions/github-script@v7
17-
with:
18-
script: |
19-
const user = context.payload.sender.login
20-
console.log(`Validate user: ${user}`)
21-
22-
let hasTriagePermission = false
23-
try {
24-
const { data } = await github.rest.repos.getCollaboratorPermissionLevel({
25-
owner: context.repo.owner,
26-
repo: context.repo.repo,
27-
username: user,
28-
});
29-
hasTriagePermission = data.user.permissions.triage
30-
} catch (e) {
31-
console.warn(e)
32-
}
33-
34-
if (hasTriagePermission) {
35-
console.log('Allowed')
36-
await github.rest.reactions.createForIssueComment({
37-
owner: context.repo.owner,
38-
repo: context.repo.repo,
39-
comment_id: context.payload.comment.id,
40-
content: '+1',
41-
})
42-
} else {
43-
console.log('Not allowed')
44-
await github.rest.reactions.createForIssueComment({
45-
owner: context.repo.owner,
46-
repo: context.repo.repo,
47-
comment_id: context.payload.comment.id,
48-
content: '-1',
49-
})
50-
throw new Error('not allowed')
51-
}
52-
5318
- name: Checkout
5419
uses: actions/checkout@v4
5520
with:
56-
ref: refs/pull/${{ github.event.issue.number }}/head
21+
fetch-depth: 0
5722

5823
- uses: ./.github/actions/setup-and-build
5924

6025
- name: Publish to pkg.pr.new
6126
run: >
62-
pnpm dlx pkg-pr-new@0.0 publish --compact --pnpm
27+
pnpm dlx pkg-pr-new publish --compact --pnpm
6328
./packages/astro
6429
./packages/react
6530
./packages/runtime

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
## [1.3.1](https://github.com/stackblitz/tutorialkit/compare/1.3.0...1.3.1) (2024-11-25)
2+
3+
4+
### Bug Fixes
5+
6+
* **astro:** allow URLs in `meta.image` ([#422](https://github.com/stackblitz/tutorialkit/issues/422)) ([3125547](https://github.com/stackblitz/tutorialkit/commit/3125547c043fe4a76dca95b1eb973362967ccf02))
7+
* switch default `meta.image` to `.png` ([#427](https://github.com/stackblitz/tutorialkit/issues/427)) ([d39bf40](https://github.com/stackblitz/tutorialkit/commit/d39bf404bc1947c48b5cb15164f20f67c0be49bc))
8+
* warn when using `.svg` in `meta.image` ([#377](https://github.com/stackblitz/tutorialkit/issues/377)) ([6e1edc1](https://github.com/stackblitz/tutorialkit/commit/6e1edc1af274d0eb65587f358e5db9557d259171))
9+
10+
11+
112
# [1.3.0](https://github.com/stackblitz/tutorialkit/compare/1.2.2...1.3.0) (2024-11-15)
213

314

docs/tutorialkit.dev/src/content/docs/reference/configuration.mdx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,10 +426,11 @@ type DownloadAsZip =
426426
427427
```
428428

429-
##### `meta`
429+
### `meta`
430430

431431
Configures `<meta>` tags for Open Graph protocole and Twitter.
432432
TutorialKit will use your logo as the default image.
433+
Relative paths are resolved to `public` directory.
433434
<PropertyTable inherited type="MetaTagsSchema" />
434435

435436
The `MetaTagsSchema` type has the following shape:
@@ -449,14 +450,21 @@ meta:
449450
image: /cover.png
450451
title: Title shown on social media and search engines
451452
description: Description shown on social media and search engines
453+
454+
meta:
455+
image: /cover.png # Resolves to public/cover.png
456+
457+
meta:
458+
image: 'https://tutorialkit.dev/tutorialkit-opengraph.png' # URL is used as is
459+
452460
```
453461

454462
:::tip
455463
If your logo uses the SVG format, it may not display on most social platforms.
456464
Use a raster format instead, such as WEBP or PNG.
457465
:::
458466

459-
##### `custom`
467+
### `custom`
460468

461469
Assign custom fields to a chapter/part/lesson.
462470
<PropertyTable inherited type="Record<string,any>" />

integration/cli/__snapshots__/npm-built.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
"logo-dark.svg",
1111
"logo.svg",
1212
"template-default.json"
13-
]
13+
]

integration/cli/__snapshots__/npm-created.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@
5050
"src/templates/default/style.css",
5151
"tsconfig.json",
5252
"uno.config.ts"
53-
]
53+
]

integration/cli/__snapshots__/pnpm-built.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
"logo-dark.svg",
1111
"logo.svg",
1212
"template-default.json"
13-
]
13+
]

integration/cli/__snapshots__/pnpm-created.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@
5050
"src/templates/default/style.css",
5151
"tsconfig.json",
5252
"uno.config.ts"
53-
]
53+
]

integration/cli/__snapshots__/yarn-built.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
"logo-dark.svg",
1111
"logo.svg",
1212
"template-default.json"
13-
]
13+
]

integration/cli/__snapshots__/yarn-created.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@
5050
"tsconfig.json",
5151
"uno.config.ts",
5252
"yarn.lock"
53-
]
53+
]

integration/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
"@tutorialkit/theme": "workspace:*",
1010
"execa": "^9.2.0",
1111
"tempy": "^3.1.0",
12-
"vitest": "^2.1.1"
12+
"vitest": "^3.0.5"
1313
}
1414
}

0 commit comments

Comments
 (0)