# Wiki Compilation Methodology
This document explains how thematic compilations are created for the Prabhupada Archive wiki, using a **reference-based approach** that never duplicates source content.
---
## Core Philosophy: Reference, Don't Copy
Traditional compilations require copying and pasting text from source books. This creates several problems:
1. **Duplication** - The same text exists in multiple places
2. **Drift** - If the source is corrected, copies become outdated
3. **Attribution** - Easy to lose track of where quotes came from
4. **Bulk** - Compilation files become enormous
Our approach is different:
```
┌────────────────────────────────────────────────────────────────
│ TRADITIONAL COMPILATION
│
│ Source Book ───┬──(copy)──▶ Compilation A
│ ├──(copy)──▶ Compilation B
│ └──(copy)──▶ Compilation C
│
│ Problem: 4 copies of same text, all can drift apart
└────────────────────────────────────────────────────────────────
┌────────────────────────────────────────────────────────────────
│ OUR REFERENCE-BASED APPROACH
│
│ ┌──(embed)── Compilation A
│ Source Book ◀───────┼──(embed)── Compilation B
│ (single source └──(embed)── Compilation C
│ of truth)
│
│ Benefit: 1 source, always current, lightweight files
└────────────────────────────────────────────────────────────────
```
---
## How It Works
### The Embed System
Obsidian's embed syntax (`![[path]]`) pulls content from source files at render time. We enhance this with **selective highlighting** - the ability to highlight specific passages within the embedded content.
### Basic Embed
```markdown
![[sb/1/2/13]]
```
This embeds the entire verse (text, synonyms, translation, purport).
### Targeting Sections
```markdown
![[sb/1/2/13#purport]] ← Only the purport
![[sb/1/2/13#translation]] ← Only the translation
![[bg/4/13]] ← Full verse with everything
```
---
## Highlight Methods
We support four methods for highlighting specific text within embeds:
### Method 1: Embed Title (Recommended)
The text after the `|` becomes the highlight instruction:
```markdown
![[sb/6/4/33#purport|The vibration of the Hare Kṛṣṇa mahā-mantra is not a material sound]]
```
**Result:** The entire purport is embedded, with "The vibration of the Hare Kṛṣṇa mahā-mantra is not a material sound" highlighted in yellow.
### Method 2: Data-Attribute Span
Place a span element after the embed:
```markdown
![[sb/1/2/13]]
<span data-hi="And in each and every one of the abovementioned divisions...to please the supreme authority"></span>
```
**Advantage:** Allows very long highlight text without affecting the embed syntax.
### Method 3: Range Highlighting
Use `...` to highlight from one phrase to another:
```markdown
![[sb/4/14/20#purport|The word dharma...without varṇāśrama-dharma]]
```
**Result:** Highlights everything from "The word dharma" through "without varṇāśrama-dharma", even if it spans multiple sentences.
### Method 4: Paragraph Numbers
Highlight specific paragraphs by number:
```markdown
![[sb/1/2/13#purport|p1,3,6-7]]
```
**Result:** Highlights paragraphs 1, 3, 6, and 7 of the purport.
---
## Multiple Highlights
Separate multiple highlight phrases with `;;` or `::`:
```markdown
![[bg/4/13#purport|cātur-varṇyam;;not by birth, but by quality]]
```
**Result:** Both "cātur-varṇyam" and "not by birth, but by quality" are highlighted.
---
## The Conversion Workflow
### Step 1: Devotee Creates Original Compilation
A devotee (or group of devotees) curates quotes on a theme - gathering references from books, lectures, letters, and conversations. This might exist as:
- A PDF document
- A Word file
- A physical book (like *Śikṣāmṛta* or *Nāmāmṛta*)
- A website compilation
### Step 2: AI Converts to Embed Format
The AI assistant:
1. **Reads** the source compilation
2. **Identifies** each quote's original source (book, chapter, verse)
3. **Locates** the exact passage in our archive files
4. **Creates** an embed reference with highlight instruction
5. **Preserves** the thematic organization
### Step 3: Human Oversight
The human overseer:
1. **Reviews** the conversions for accuracy
2. **Verifies** highlights match the intended passages
3. **Adjusts** section organization if needed
4. **Approves** the final compilation
### The Process Diagram
```
┌────────────────────────────────────────────────────────────────
│ CONVERSION WORKFLOW
│
│ ┌─────────────┐
│ │ Original │ Devotee-curated compilation
│ │ Compilation │ (PDF, book, document)
│ └──────┬──────┘
│ │
│ ▼
│ ┌─────────────┐ ┌─────────────┐
│ │ AI Reads │──▶│ Identifies │ "SB 1.2.13" found
│ │ Source │ │ Sources │ in /sb/1/2/13.md
│ └─────────────┘ └──────┬──────┘
│ │
│ ▼
│ ┌─────────────┐
│ │Creates Embed│ ![[sb/1/2/13#purport|
│ │ + Highlight │ highlighted text]]
│ └──────┬──────┘
│ │
│ ▼
│ ┌─────────────┐
│ │ Human │ Verify, adjust,
│ │ Reviews │ approve
│ └──────┬──────┘
│ │
│ ▼
│ ┌─────────────┐
│ │ Final │ wiki/compile/
│ │ Compilation │ [topic]/[section].md
│ └─────────────┘
│
└────────────────────────────────────────────────────────────────
```
---
## Example: Nāmāmṛta
The original *Nāmāmṛta* was compiled by devotees into a printed book with thematic sections about the holy name. Our conversion:
**Original (in printed book):**
> "The vibration of the Hare Kṛṣṇa mahā-mantra is not a material sound, and similarly the form of the Lord and His appearance and activities are all nonmaterial."
> —Śrīmad-Bhāgavatam 6.4.33, Purport
**Our Reference Format:**
```markdown
![[sb/6/4/33#purport|The vibration of the Hare Kṛṣṇa mahā-mantra is not a material sound, and similarly the form of the Lord and His appearance and activities are all nonmaterial]]
—SB [[sb/6/4/33|6.4.33]] Purport
```
**Benefits:**
1. The quote is **never duplicated** - it lives only in `/sb/6/4/33.md`
2. If the source is ever corrected, the compilation **automatically updates**
3. The **full context** (entire purport) is accessible via the embed
4. The **specific passage** is highlighted for the reader
5. The **citation link** takes readers directly to the source
---
## Example: Śikṣāmṛta (Letters)
*Śikṣāmṛta* compiles instructions from Śrīla Prabhupāda's letters. Our format:
```markdown
![[letters/1967/670724_brahmananda|"Please keep steady, follow all my instructions scrupulously, chant Hare Krsna and Krsna will give you all strength."]]
—Brahmananda, 24 July, 1967
```
The entire letter is embedded, with the key instruction highlighted.
---
## CSS Classes
Compilation files use special CSS classes:
```yaml
---
cssclasses:
- scripture-minimal # Removes verse structure styling
- text-quotes # Styles quotes appropriately
---
```
---
## Folder Structure
```
wiki/compile/
├── siksamrita.md # Index for Śikṣāmṛta compilation
├── siksamrita/ # Topic files
│ ├── chanting-hare-krsna.md
│ ├── book-distribution.md
│ └── ...
├── namamrita.md # Index for Nāmāmṛta compilation
├── namamrita/ # Topic files
│ ├── maha-mantra.md
│ ├── the-ten-offenses.md
│ └── ...
└── embed/ # Embed-heavy compilations
└── varnasrama-dharma/
└── 1-the-importance-of-varnasrama.md
```
---
## Technical Implementation
The `EmbedHighlighter` module in `publish.js`:
1. **Intercepts** rendered embeds after Obsidian processes them
2. **Extracts** the highlight instruction from embed title or data-span
3. **Searches** the embedded content for matching text (case-insensitive, italics-agnostic)
4. **Wraps** matches in `<mark>` tags with appropriate styling
5. **Handles** multiple highlights and range highlighting
---
## Why This Matters
### For Readers
- See highlighted passages in context
- Click through to full source
- Trust that quotes are accurate
### For Maintainers
- No duplication to keep in sync
- Corrections propagate automatically
- Compilations stay lightweight
### For the Archive
- Single source of truth
- Clear provenance for all quotes
- Scalable to any number of compilations
---
## Semi-Automated Process
The AI handles the tedious work:
- Parsing original compilations
- Matching quotes to source files
- Generating embed syntax
- Formatting citations
The human provides:
- Quality control
- Thematic judgment
- Final approval
- Organizational decisions
This collaboration allows us to convert large compilations (hundreds of quotes) efficiently while maintaining accuracy.
---
*This methodology ensures that every quote in our wiki compilations remains connected to its source, verified, and current.*