Skip to content

Commit fd2760d

Browse files
committed
update docs for 0.1.7
1 parent 5541937 commit fd2760d

Some content is hidden

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

57 files changed

+5414
-1485
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,11 @@ jobs:
2727
bun install --frozen-lockfile
2828
cd ..
2929
- name: Install, build, and upload your site
30-
uses:
31-
withastro/action@v1
30+
uses: withastro/action@v1
3231
with:
3332
path: . # The root location of your Astro project inside the repository. (optional)
3433
# node-version: 18 # The specific version of Node that should be used to build your site. Defaults to 18. (optional)
35-
package-manager: npm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
34+
package-manager: bun@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
3635

3736
deploy:
3837
needs: build

.prettierignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/lib
2+
node_modules
3+
package-lock.json
4+
dist
5+
.idea
6+
.vscode
7+
8+
/obsidian-js-engine-plugin
9+
/src/content/docs/api

.prettierrc.mjs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// .prettierrc.mjs
2+
/** @type {import("prettier").Config} */
3+
export default {
4+
plugins: ['prettier-plugin-astro', 'prettier-plugin-svelte'],
5+
6+
printWidth: 160,
7+
useTabs: true,
8+
semi: true,
9+
singleQuote: true,
10+
arrowParens: 'avoid',
11+
12+
overrides: [
13+
{
14+
files: '*.astro',
15+
options: {
16+
parser: 'astro',
17+
},
18+
},
19+
],
20+
};

README.md

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

33
Plugin: [JS Engine](https://github.com/mProjectsCode/obsidian-js-engine-plugin)
44

5-
Docs Link: [JS Engine Docs](https://www.moritzjung.dev/obsidian-js-engine-plugin-docs/)
5+
Docs Link: [JS Engine Docs](https://www.moritzjung.dev/obsidian-js-engine-plugin-docs/)

astro.config.mjs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { defineConfig } from 'astro/config';
22
import starlight from '@astrojs/starlight';
33
import starlightTypeDoc, { typeDocSidebarGroup } from 'starlight-typedoc';
4+
import starlightLinksValidator from 'starlight-links-validator';
45
import remarkMath from 'remark-math';
56
import rehypeMathjax from 'rehype-mathjax';
67

@@ -14,6 +15,10 @@ export default defineConfig({
1415
social: {
1516
github: 'https://github.com/mProjectsCode/obsidian-js-engine-plugin',
1617
},
18+
components: {
19+
TableOfContents: './src/components/TableOfContents.astro',
20+
SocialIcons: './src/components/SocialIcons.astro',
21+
},
1722
sidebar: [
1823
{
1924
label: 'Guides',
@@ -30,20 +35,23 @@ export default defineConfig({
3035
useStarlightUiThemeColors: true,
3136
},
3237
plugins: [
38+
starlightLinksValidator({
39+
errorOnRelativeLinks: false,
40+
exclude: ['/obsidian-js-engine-plugin-docs/api/**/*'],
41+
}),
3342
starlightTypeDoc({
3443
entryPoints: [
3544
// 'obsidian-js-engine-plugin/JsEngine.d.ts',
3645
'obsidian-js-engine-plugin/jsEngine/index.ts',
3746
],
3847
typeDoc: {
39-
parametersFormat: 'table',
48+
parametersFormat: 'htmlTable',
4049
propertiesFormat: 'list',
41-
enumMembersFormat: 'table',
50+
enumMembersFormat: 'htmlTable',
4251
typeDeclarationFormat: 'table',
4352
excludePrivate: true,
4453
excludeProtected: true,
4554
excludeInternal: true,
46-
// useCodeBlocks: true,
4755

4856
plugin: ['typedoc-plugin-mdn-links'],
4957
},
@@ -57,11 +65,7 @@ export default defineConfig({
5765
}),
5866
],
5967
markdown: {
60-
remarkPlugins: [
61-
remarkMath,
62-
],
63-
rehypePlugins: [
64-
rehypeMathjax,
65-
],
68+
remarkPlugins: [remarkMath],
69+
rehypePlugins: [rehypeMathjax],
6670
},
6771
});

bun.lockb

-37 KB
Binary file not shown.

obsidian-js-engine-plugin

package.json

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,31 @@
11
{
2-
"name": "obsidian-js-engine-plugin-docs",
3-
"type": "module",
4-
"version": "0.0.1",
5-
"scripts": {
6-
"dev": "astro dev",
7-
"start": "astro dev",
8-
"build": "astro build",
9-
"preview": "astro preview",
10-
"astro": "astro"
11-
},
12-
"dependencies": {
13-
"@astrojs/starlight": "^0.21.5",
14-
"astro": "^4.6.0",
15-
"rehype-mathjax": "^6.0.0",
16-
"remark-math": "^6.0.0",
17-
"sharp": "^0.33.3",
18-
"starlight-typedoc": "^0.11.0",
19-
"typedoc": "^0.25.13",
20-
"typedoc-plugin-markdown": "4.0.0-next.55",
21-
"typedoc-plugin-mdn-links": "^3.1.20"
22-
}
2+
"name": "obsidian-js-engine-plugin-docs",
3+
"type": "module",
4+
"version": "0.0.1",
5+
"scripts": {
6+
"dev": "astro dev",
7+
"start": "astro dev",
8+
"build": "astro build",
9+
"preview": "astro preview",
10+
"astro": "astro",
11+
"format": "prettier --plugin prettier-plugin-astro --plugin prettier-plugin-svelte --write ."
12+
},
13+
"dependencies": {
14+
"@astrojs/starlight": "0.25.4",
15+
"astro": "4.13.2",
16+
"starlight-links-validator": "^0.9.1",
17+
"rehype-mathjax": "^6.0.0",
18+
"remark-math": "^6.0.0",
19+
"sharp": "^0.33.4",
20+
"starlight-typedoc": "^0.14.0",
21+
"typedoc": "^0.26.5",
22+
"typedoc-plugin-markdown": "^4.2.3",
23+
"typedoc-plugin-mdn-links": "^3.2.7",
24+
"typescript": "^5.5.4"
25+
},
26+
"devDependencies": {
27+
"prettier": "^3.3.3",
28+
"prettier-plugin-astro": "^0.14.1",
29+
"prettier-plugin-svelte": "^3.2.6"
30+
}
2331
}

src/components/SocialIcons.astro

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
import type { Props } from '@astrojs/starlight/props';
3+
import Default from '@astrojs/starlight/components/SocialIcons.astro';
4+
---
5+
6+
<!-- Add custom social link with its SVG icon and a label. -->
7+
<a href="https://github.com/sponsors/mProjectsCode" rel="me" class="sl-flex">
8+
<span class="sr-only">Support me</span>
9+
<!--<svg-->
10+
<!-- aria-hidden="true"-->
11+
<!-- fill="currentColor"-->
12+
<!-- height="16"-->
13+
<!-- width="16"-->
14+
<!-- viewBox="0 0 24 24"-->
15+
<!--&gt;-->
16+
<!-- <path-->
17+
<!-- d="m10 17.55-1.77 1.72a2.47 2.47 0 0 1-3.5-3.5l4.54-4.55a2.46 2.46 0 0 1 3.39-.09l.12.1a1 1 0 0 0 1.4-1.43 2.75 2.75 0 0 0-.18-.21 4.46 4.46 0 0 0-6.09.22l-4.6 4.55a4.48 4.48 0 0 0 6.33 6.33L11.37 19A1 1 0 0 0 10 17.55ZM20.69 3.31a4.49 4.49 0 0 0-6.33 0L12.63 5A1 1 0 0 0 14 6.45l1.73-1.72a2.47 2.47 0 0 1 3.5 3.5l-4.54 4.55a2.46 2.46 0 0 1-3.39.09l-.12-.1a1 1 0 0 0-1.4 1.43 2.75 2.75 0 0 0 .23.21 4.47 4.47 0 0 0 6.09-.22l4.55-4.55a4.49 4.49 0 0 0 .04-6.33Z"-->
18+
<!-- >-->
19+
<!-- </path>-->
20+
<!--</svg>-->
21+
<svg aria-hidden="true" fill="currentColor" height="16" width="16" viewBox="0 0 512 512">
22+
<!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
23+
<path
24+
d="M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9L464.4 300.4c30.4-28.3 47.6-68 47.6-109.5v-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1v5.8c0 41.5 17.2 81.2 47.6 109.5z"
25+
></path>
26+
</svg>
27+
</a>
28+
<!-- Render the default social links. -->
29+
<Default {...Astro.props}><slot /></Default>
30+
31+
<!-- Add styles to mimic the default links appearance. -->
32+
<style>
33+
a {
34+
color: var(--sl-color-text-accent);
35+
margin: -0.5em;
36+
padding: 0.5em;
37+
}
38+
39+
a:hover {
40+
opacity: 0.66;
41+
}
42+
</style>

src/components/Sponsors.astro

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
3+
---
4+
5+
<section style="margin-top: 0.5rem">
6+
<h2>Support me</h2>
7+
<iframe src="https://github.com/sponsors/mProjectsCode/button" title="Sponsor mProjectsCode" height="32" width="114" style="border: 0; border-radius: 6px;"
8+
></iframe>
9+
</section>

0 commit comments

Comments
 (0)