tfrere HF Staff commited on
Commit
e503ab0
·
1 Parent(s): 5ae519a

fix: Remove Notion images from repo and fix copy permissions

Browse files

- Delete all Notion imported images (will be fetched at runtime)
- Delete article.default.mdx (not needed)
- Use writeFileSync instead of copyFileSync to avoid EPERM
- Images will be downloaded fresh at container startup

app/scripts/notion-importer/index.mjs CHANGED
@@ -188,7 +188,9 @@ function copyToAstroContent(outputDir) {
188
  const mdxFiles = files.filter(file => file.endsWith('.mdx'));
189
  if (mdxFiles.length > 0) {
190
  const mdxFile = join(outputDir, mdxFiles[0]); // Take the first MDX file
191
- copyFileSync(mdxFile, ASTRO_CONTENT_PATH);
 
 
192
  console.log(` ✅ Copied MDX to ${ASTRO_CONTENT_PATH}`);
193
  }
194
 
 
188
  const mdxFiles = files.filter(file => file.endsWith('.mdx'));
189
  if (mdxFiles.length > 0) {
190
  const mdxFile = join(outputDir, mdxFiles[0]); // Take the first MDX file
191
+ // Read and write instead of copy to avoid EPERM issues
192
+ const mdxContent = readFileSync(mdxFile, 'utf8');
193
+ writeFileSync(ASTRO_CONTENT_PATH, mdxContent);
194
  console.log(` ✅ Copied MDX to ${ASTRO_CONTENT_PATH}`);
195
  }
196
 
app/src/content/article.default.mdx DELETED
@@ -1,18 +0,0 @@
1
- ---
2
- title: "Loading from Notion..."
3
- description: "This content will be replaced at container startup"
4
- published: "2025"
5
- authors:
6
- - name: "Author"
7
- tableOfContentsAutoCollapse: true
8
- ---
9
-
10
- ## Loading
11
-
12
- This article is being imported from Notion. Please wait a moment...
13
-
14
- If you're seeing this, the Notion import is either:
15
- - Still in progress (first startup takes ~5-10 minutes)
16
- - Disabled (set ENABLE_NOTION_IMPORT=true)
17
- - Failed (check container logs)
18
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/src/content/assets/image/image_27877f1c-9c9d-8013-b668-f14bd1ac0ec0.png DELETED
Binary file (131 Bytes)
 
app/src/content/assets/image/image_27877f1c-9c9d-8014-834f-d700b623256b.png DELETED
Binary file (130 Bytes)
 
app/src/content/assets/image/image_27877f1c-9c9d-801d-841a-e35011491566.png DELETED
Binary file (131 Bytes)
 
app/src/content/assets/image/image_27877f1c-9c9d-8031-ac8d-c5678af1bdd5.png DELETED
Binary file (131 Bytes)
 
app/src/content/assets/image/image_27877f1c-9c9d-8048-9b7e-db4fa7485915.png DELETED
Binary file (131 Bytes)
 
app/src/content/assets/image/image_27877f1c-9c9d-804d-bd0a-e0b1c15e504f.png DELETED
Binary file (131 Bytes)
 
app/src/content/assets/image/image_27877f1c-9c9d-8075-ae2e-dc24fe9296ca.png DELETED
Binary file (130 Bytes)
 
app/src/content/assets/image/image_27877f1c-9c9d-8078-b6da-c7a4c67c8f35.png DELETED
Binary file (130 Bytes)
 
app/src/content/assets/image/image_27877f1c-9c9d-808d-9c6d-fae817ac8868.png DELETED
Binary file (130 Bytes)
 
app/src/content/assets/image/image_27877f1c-9c9d-808f-b712-c7c608da3fc6.png DELETED
Binary file (131 Bytes)
 
app/src/content/assets/image/image_27877f1c-9c9d-80a9-b4d0-f2129716632d.png DELETED
Binary file (131 Bytes)
 
app/src/content/assets/image/image_27877f1c-9c9d-80aa-b968-c54c9fe7e5d7.png DELETED
Binary file (131 Bytes)
 
app/src/content/assets/image/image_27877f1c-9c9d-80b6-be07-e8646502f82a.png DELETED
Binary file (131 Bytes)
 
app/src/content/assets/image/image_27877f1c-9c9d-80b9-8cfb-f0a6aaaa8760.png DELETED
Binary file (131 Bytes)
 
app/src/content/assets/image/image_27877f1c-9c9d-80e7-a500-fb79cebde7e3.png DELETED
Binary file (131 Bytes)
 
app/src/content/assets/image/image_27877f1c-9c9d-80e9-b729-dbd328930bed.png DELETED
Binary file (131 Bytes)