Skip to content

Commit 0da74a9

Browse files
committed
Add a searchable prompt library with categories for work, learning, images, and personal use
- Implement build script to bundle markdown files into prompts.json - Create categories for prompts: personal, work, learning, and image - Add prompts for various use cases in respective category markdown files - Develop index.html for the prompt library with search functionality - Style the prompt library with CSS for improved user experience - Update README files to link to the new searchable prompt library - Exclude markdown files from being processed as pages in mkdocs
1 parent 9985602 commit 0da74a9

15 files changed

Lines changed: 16 additions & 140 deletions

File tree

‎.github/workflows/publish.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
rsync -av --exclude='docs' --exclude='.git' --exclude='.github' --exclude='mkdocs.yml' ./ docs/
4444
4545
# Bundle the Prompt Library's markdown files into the prompts.json its page loads
46-
- run: python docs/AI/Prompts/Library/build.py
46+
- run: python docs/AI/Prompts/build.py
4747

4848
# Build the static HTML files into the default 'site/' folder
4949
- run: mkdocs build

‎.gitignore‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# Generated by AI/Prompts/Library/build.py (the publish workflow builds it fresh)
2-
AI/Prompts/Library/prompts.json
1+
# Generated by AI/Prompts/build.py (the publish workflow builds it fresh)
2+
AI/Prompts/prompts.json

‎AI/Prompts/Personal-Prompts.md‎

Lines changed: 0 additions & 28 deletions
This file was deleted.

‎AI/Prompts/README.md‎

Lines changed: 0 additions & 99 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Bundle the Prompt Library's markdown files into prompts.json for the website.
22
3-
Every file in prompts/ is one category, named after the file (work.md -> "work").
3+
Every file in categories/ is one category, named after the file (work.md -> "work").
44
To add a category, add a file. Inside a file, each prompt looks like this:
55
66
## Prompt title
@@ -26,7 +26,7 @@
2626
from pathlib import Path
2727

2828
HERE = Path(__file__).resolve().parent
29-
SOURCE = HERE / "prompts"
29+
SOURCE = HERE / "categories"
3030
CATEGORY_ORDER = ["personal", "work", "learning", "image"] # any other files follow, A-Z
3131
FENCE = re.compile(r"^(`{3,}|~{3,})")
3232
TAGS = re.compile(r"^#[\w-]+(\s+#[\w-]+)*$")
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)