π CI-Driven Publishing
π€ AI Summary
-
π High-Level Summary: A proposed architecture shift that moves all content transformation from mobile (Enveloppe plugin) to CI, enabling faster mobile sync and simpler workflow. π―
-
π Key Concepts: The goal is to replace heavy on-device processing with a lightweight git sync, then let CI do the transformation work. This should dramatically reduce the time spent waiting on the phone! β‘π±
π Research: Current System Analysis
π Current Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CURRENT SYSTEM β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β π± MOBILE (Enveloppe Plugin) βοΈ GITHUB CI (Quartz) β
β βββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββ β
β β 1. Scan vault for files β β 1. Checkout code β β
β β 2. Parse frontmatter β β 2. Build Quartz β β
β β 3. Convert wikilinks β md β β 3. Generate HTML β β
β β 4. Process embeddings β β 4. Deploy to Pages β β
β β 5. Handle dataview queries β β β β
β β 6. Commit to GitHub β β β β
β β β β β β
β β‘ SLOW - lots of CPU work β β β‘ FAST - already optimizedβ β
β π Battery drain β β π Unlimited resources β β
β πΆ Network heavy β β πΆ Just fetches code β β
β βββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π§ What Enveloppe Currently Does (on mobile)
Based on Enveloppe documentation:
- π Link Conversion:
[[wikilinks]]β markdown links - π Frontmatter Processing: Parses and transforms metadata
- πΌοΈ Embed Processing: Handles
![[embed]]syntax - π Dataview Support: Processes
dataviewjs, inline DQL - π Folder Notes: Renames to
index.mdas needed - π Repo Management: Creates branches, PRs, auto-merges
- π§Ή File Cleanup: Removes depublished/deleted files
π© Pain Points
- β‘ Mobile is slow: All transformation happens on phone CPU
- π Battery drain: Intensive processing on mobile
- π Link bugs: Has caused broken links (see 2025-06-07 - video path issue)
- π§ Complex config: Enveloppe settings are extensive
- π± Platform-specific: Obsidian-only solution
ποΈ Proposed Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PROPOSED SYSTEM β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β π± MOBILE (Simple Git Sync) βοΈ GITHUB CI β
β βββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββ β
β β 1. Write/edit note β β 1. Checkout raw content β β
β β 2. Save (Obsidian auto-save)β β 2. Run Enveloppe CLI β β
β β 3. Commit & push raw .md β β (or custom transformer)β β
β β β β 3. Build Quartz β β
β β β β 4. Deploy to Pages β β
β β β β β β
β β‘ INSTANT - just git push β β β‘ FAST - optimized CI β β
β π Minimal battery β β π Unlimited resources β β
β πΆ Small payload (.md only) β β πΆ Downloads content β β
β βββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β¨ Key Changes
- π± Mobile: Use simple git sync (Working Copy on iOS, or other git apps)
- π« No plugin needed for publishing
- π Just push raw Obsidian vault files
- βοΈ CI: Add content transformation step before Quartz build
- Option A: Run Enveloppe CLI in CI
- Option B: Write custom Node.js transformer
- Option C: Extend Quartz with link conversion plugin
- π Link Strategy:
- Keep wikilinks in Obsidian (
[[note]]) - Convert to markdown links in CI (
[note](./note.md)) - This preserves Obsidian usability! π§‘
- Keep wikilinks in Obsidian (
π Benefits
| Aspect | Current (Enveloppe) | Proposed (CI-Driven) |
|---|---|---|
| Mobile sync time | 30-60s+ | 5-10s |
| Battery impact | High | Minimal |
| Link conversion | On-device | In CI |
| Quartz build | Pre-optimized | Same |
| Failure mode | Mobile crash | CI failure (retryable) |
| Offline work | Limited | Full git workflow |
| Platform coupling | Obsidian-only | Any git-synced content |
π― Implementation Options
Option A: Enveloppe CLI in CI
- π Pros: Proven transformation logic
- π Cons: May need Docker or Node setup in CI
Option B: Custom Link Transformer
- π Pros: Full control, minimal deps
- π Cons: Must maintain ourselves
Option C: Quartz Native + Custom Plugin
- π Pros: Single build pipeline
- π Cons: More Quartz-specific
Recommended: Start with Option A or B, preserve Quartz optimization work π
π‘οΈ Risk Mitigation
π’ Phase 1: Parallel Run (Low Risk)
- Set up CI to process raw content
- Keep Enveloppe running on mobile
- Compare outputs before switching
- Deploy both versions temporarily
π‘ Phase 2: Shadow Mode
- CI processes content but doesnβt deploy
- Validate output matches Enveloppe
- Fix any discrepancies
π΄ Phase 3: Switch
- Disable Enveloppe on mobile
- Enable CI transformation
- Monitor for 1 week
- Rollback plan ready
π Rollback Plan
- Re-enable Enveloppe on mobile
- Revert CI changes
- No data loss (content in git)! πΎ
π Spec for Implementation (For Opus 4.6)
π Context
- Repository:
bagrounds/obsidian-github-publisher-sync - Current: Enveloppe plugin does content transformation on mobile
- Goal: Move transformation to CI for faster mobile workflow
π Requirements
-
CI Pipeline Enhancement
- Add a new job or step before Quartz build
- Process raw markdown files from
content/directory - Convert wikilinks (
[[note]]) to markdown links ([note](./note.md)) - Handle internal links with folder paths correctly
-
Link Conversion Logic
// Pseudocode for link conversion const convertWikilinks = (content) => { // [[note]] β [note](./note.md) // [[folder/note]] β [note](./folder/note.md) // [[note|alias]] β [alias](./note.md) } -
Frontmatter Handling
- Pass through
share: truefiles only - Ensure
share: falsefiles remain unpublished
- Pass through
-
Compatibility
- Must work with existing Quartz build
- Preserve all existing Quartz optimizations (content-hash cache, etc.)
- No regression in build time
-
Testing
- Create test cases for link conversion
- Verify output matches Enveloppeβs current output
- Test with real content from vault
π Deliverables
- Modified
.github/workflows/deploy.ymlwith transformation step - New transformation script (either Enveloppe CLI wrapper or custom)
- Test file proving correctness
- Documentation of the change
β οΈ Constraints
- Keep build time under 2 minutes
- Donβt break existing functionality
- Maintain backward compatibility with existing content
β Success Criteria
- Mobile sync time reduced by 50%+
- Build output identical to current system
- No regressions in published site
π Related
π Reflections on Blogging & Publishing
- 2024-04-19 | π I Start Blogging Today! - When it all began
- 2024-04-21 | βοΈ Blog | π Obsidian | π€ Automation | π Solarized | π¬ Comments πͺ - Original setup with GitHub Publisher (now Enveloppe) and Quartz
- 2024-11-20 | πͺ Let There Be Comments π¬ - First commits to the repo
- 2024-11-21 | π§± Refactor RSS & Search - Quartz features exploration
- 2024-11-23 | π§βπ Exploring Quartz Features - Graph, video embeds, build time optimization
- 2024-11-24 | π¬ Quartz Giscus Comments - Adding comments
- 2025-03-22 | ποΈ Blog Anniversary + Quartz Upgrades - Almost a year of blogging, Quartz updates
- 2025-04-20 | π Graduated to Quartz v4 - Major Quartz upgrade
- 2025-04-22 | π Graph & Backlinks - More Quartz improvements
- 2025-06-07 | π Farm | πΎ Software | π€ Trauma | π€π¦ AutoTweet β¨οΈ - Enveloppe link bug (video path issue)
- 2026-01-03 | π Auto-Updating Index Timestamps - Script to automate index updates
π Other Links
- Todayβs Reflection
- Bug Report: Enveloppe Link Issue
- Obsidian
- Quartz SSG
- Enveloppe Plugin
- Agentic Software Engineering (for CI automation ideas)