Skip to content

Commit 3f7b1a8

Browse files
docs(website): add imports documentation (#780)
1 parent a4a9b1d commit 3f7b1a8

3 files changed

Lines changed: 81 additions & 24 deletions

File tree

docs/website/.vitepress/components/features/TheFeatures.vue

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import FeaturesItem from './FeaturesItem.vue'
33
</script>
44

55
<template>
6-
<div class="spaces">
6+
<div class="features">
77
<FeaturesItem title="Code Snippets">
88
Build a reusable code library across projects and languages. Organize
99
snippets with folders, tags, and fragments, then edit them with
@@ -41,8 +41,11 @@ import FeaturesItem from './FeaturesItem.vue'
4141
Convert, encode, hash, and generate data right inside massCode with tools
4242
for JSON, Base64, URLs, colors, passwords, UUIDs, and more.
4343
</FeaturesItem>
44-
</div>
45-
<div class="extras">
44+
<FeaturesItem title="Imports">
45+
Bring existing libraries into your local vault. Import snippets from VS
46+
Code, Raycast, SnippetsLab, and public GitHub Gists, or import Obsidian
47+
markdown folders into Notes with a preview before writing.
48+
</FeaturesItem>
4649
<FeaturesItem title="Integrations">
4750
Bring your snippet library into the tools you already use.
4851
<AppLink
@@ -70,45 +73,47 @@ import FeaturesItem from './FeaturesItem.vue'
7073
</template>
7174

7275
<style scoped>
73-
.spaces {
74-
display: grid;
75-
grid-template-columns: 1fr;
76-
gap: 16px;
77-
padding: 24px 0 8px;
78-
}
79-
80-
.extras {
76+
.features {
8177
display: grid;
8278
grid-template-columns: 1fr;
8379
gap: 16px;
84-
padding: 8px 0 24px;
80+
padding: 24px 0;
8581
}
8682
8783
@media (min-width: 768px) {
88-
.spaces {
84+
.features {
8985
grid-template-columns: repeat(6, minmax(0, 1fr));
9086
gap: 24px;
91-
padding: 24px 0 12px;
92-
}
93-
94-
.extras {
95-
grid-template-columns: repeat(2, minmax(0, 1fr));
96-
gap: 24px;
97-
padding: 12px 0 24px;
9887
}
9988
100-
.spaces > :nth-child(-n + 2) {
89+
.features > :nth-child(-n + 2) {
10190
grid-column: span 3;
10291
}
10392
104-
.spaces > :nth-child(n + 3) {
93+
.features > :nth-child(n + 3):nth-child(-n + 5) {
10594
grid-column: span 2;
10695
}
96+
97+
.features > :nth-child(n + 6) {
98+
grid-column: span 3;
99+
}
107100
}
108101
109102
@media (min-width: 1024px) {
110-
.extras {
111-
grid-template-columns: repeat(3, minmax(0, 1fr));
103+
.features {
104+
grid-template-columns: repeat(12, minmax(0, 1fr));
105+
}
106+
107+
.features > :nth-child(-n + 2) {
108+
grid-column: span 6;
109+
}
110+
111+
.features > :nth-child(n + 3):nth-child(-n + 5) {
112+
grid-column: span 4;
113+
}
114+
115+
.features > :nth-child(n + 6) {
116+
grid-column: span 3;
112117
}
113118
}
114119
</style>

docs/website/.vitepress/config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ export default defineConfig({
117117
{ text: 'Command Palette', link: '/documentation/command-palette' },
118118
{ text: 'Storage', link: '/documentation/storage' },
119119
{ text: 'Sync', link: '/documentation/sync' },
120+
{ text: 'Imports', link: '/documentation/imports' },
120121
{ text: 'Themes', link: '/documentation/themes' },
121122
],
122123
},
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: Imports
3+
description: "Import snippets, markdown notes, and API collections into massCode from VS Code, Raycast, SnippetsLab, GitHub Gists, Obsidian, OpenAPI, Postman, and Bruno."
4+
---
5+
6+
# Imports
7+
8+
Imports bring existing work into massCode so your vault can start with the material you already use. Each import shows a preview before writing to disk, including the detected source, item counts, folders, tags, and warnings for skipped or unsupported source features.
9+
10+
## Code Imports
11+
12+
Use Code imports for snippet libraries and snippet-like exports.
13+
14+
Supported sources:
15+
16+
- **VS Code snippets JSON** - imports snippets from `.json` and `.code-snippets` files.
17+
- **Raycast snippets JSON** - imports snippets from Raycast exports.
18+
- **SnippetsLab JSON** - imports snippets, folders, tags, descriptions, and fragments from SnippetsLab exports.
19+
- **Public GitHub Gist URLs** - imports files from public Gists into Code.
20+
21+
Open the **Code** space and choose **Import snippets** from the sidebar actions or Command Palette.
22+
23+
## Notes Imports
24+
25+
Use Notes imports to bring markdown notes into massCode.
26+
27+
Supported source:
28+
29+
- **Obsidian markdown folders** - imports markdown files into Notes while keeping folder structure where possible.
30+
31+
Open the **Notes** space and choose **Import notes** from the sidebar actions or Command Palette.
32+
33+
## HTTP Imports
34+
35+
Use HTTP imports when you already have API collections or specifications in another tool.
36+
37+
Supported sources:
38+
39+
- **OpenAPI JSON/YAML**
40+
- **Postman Collection v2.1 JSON**
41+
- **Postman Environment JSON**
42+
- **Bruno OpenCollection YAML**
43+
- **Bruno OpenCollection ZIP**
44+
45+
For the full HTTP workflow, see [Importing HTTP Collections](/documentation/http/importing).
46+
47+
## Preview And Warnings
48+
49+
Before anything is written to your vault, massCode reads the selected files or URL and shows a preview. Review the detected source, item counts, folders, tags, and warnings, then click **Import** to create the previewed items.
50+
51+
Warnings do not always block import. They usually mean that part of the source data has no equivalent in massCode, such as unsupported auth, disabled variables, attachments, smart groups, or source-specific metadata.

0 commit comments

Comments
 (0)