A modern macOS application for reading and navigating markdown files with an intuitive folder-based interface.
- Smart Folder Selection: Browse and select folders containing markdown files
- Recent Folders: Quick access to recently opened folders with persistent storage
- Folder Persistence: Remembers last opened folder across app restarts
- Remove Folders: Remove unwanted folders from recent list
- Rich Markdown Rendering: Full markdown support with proper formatting
- Syntax Highlighting: Swift code blocks with Xcode color scheme
- Link Navigation: Click on relative markdown links to navigate between files
- Clean Reading Interface: Distraction-free reading experience
- Sidebar Explorer: Tree-view navigation of markdown files and folders
- Expandable Folders: Show/hide folder contents with smooth animations
- Persistent State: Folder expansion state maintained across app sessions
- File Selection: Quick file switching with visual selection feedback
- Native macOS Design: Built with SwiftUI for modern macOS experience
- Smooth Animations: Fluid folder expand/collapse animations
- App Icon: Custom markdown logo for easy identification
- Responsive Layout: Adaptive interface that works on different screen sizes
- Recent Folders Storage: Up to 5 recent folders saved automatically
- Folder State Memory: Expanded/collapsed folder states persist
- Last Session Restore: Automatically reopens last selected folder
- Clean Data Management: Easy clearing of all stored data
- Launch the App: Double-click
MarkdownReader.appto start - Select a Folder: Click the folder icon (📁+) to choose a directory containing markdown files
- Browse Files: Use the sidebar to navigate through your markdown files
- Read Content: Click on any file to view its contents in the main area
- Click the folder icon in the sidebar header
- Select any directory containing
.mdfiles - The folder will be added to your recent folders list automatically
- Click the clock icon (🕐) to see recent folders
- Click any recent folder to quickly switch to it
- Click the X button next to a folder to remove it from the list
- Use "Clear All Recent" to remove all folders and reset the app
- Click on folder names to expand/collapse their contents
- Folder expansion state is automatically saved
- Nested folders are supported and properly organized
- Click on any
.mdfile in the sidebar to open it - Selected files are highlighted for easy identification
- Content appears instantly in the main reading area
- Click on relative markdown links (e.g.,
[link](./other-file.md)) - Automatically navigates to linked files in the same folder
- Supports standard markdown link formats
- Swift code blocks are automatically highlighted
- Uses Xcode color scheme for familiar syntax coloring
- Supports other programming languages with basic highlighting
- Automatic Saving: Recent folders and states are saved automatically
- Session Restore: Last opened folder loads on app restart
- State Memory: Folder expand/collapse states persist between sessions
- Use "Clear All Recent" to remove all saved folders
- This also clears folder expansion states
- Useful for starting fresh or troubleshooting
- macOS 13.0+ (Ventura or later)
- Swift 5.5+
- Xcode Command Line Tools (for building without Xcode)
- Clone or Download the project
- Open Terminal and navigate to project directory
- Run the build script:
./build.sh
- Launch the app:
open MarkdownReader.app
- Automatic Compilation: Builds Swift code with production optimizations
- Icon Generation: Creates proper macOS app icon from PNG source
- App Bundle Creation: Generates complete
.appbundle structure - No Xcode Required: Uses Swift Package Manager for building
- SwiftUI Framework: Modern declarative UI framework
- MVVM Pattern: Clean separation of concerns
- State Management: Reactive state updates with
@Publishedand@StateObject - Persistence Layer: UserDefaults-based data storage
MarkdownReader/
├── MarkdownReaderApp.swift # App entry point
├── ContentView.swift # Main app layout
├── SidebarView.swift # File navigation sidebar
├── MarkdownView.swift # Markdown content renderer
├── FileManager.swift # File system operations
├── PersistenceManager.swift # Data persistence
├── Models.swift # Data models
├── MarkdownParser.swift # Markdown processing
├── SwiftCodeView.swift # Code syntax highlighting
├── build.sh # Build automation script
└── logo-md.png # App icon source
- Swift Package Manager: Dependency-free building
- NSOpenPanel: Native file/folder selection
- UserDefaults: Lightweight data persistence
- NSAttributedString: Rich text rendering
- SwiftUI Navigation: Modern navigation patterns
App Won't Launch
- Ensure macOS 13.0+ is installed
- Check that app has proper permissions
- Try rebuilding with
./build.sh
Folders Not Showing
- Verify the selected directory contains
.mdfiles - Check folder permissions are readable
- Try clearing recent folders and re-adding
Links Not Working
- Ensure linked files exist in the same directory
- Check that links use relative paths (e.g.,
./file.md) - Verify linked files have
.mdextension
State Not Persisting
- Check app has write permissions for UserDefaults
- Try clearing all data and starting fresh
- Restart the app to reload saved state
Copyright © 2025 Jerrypm. All rights reserved.
Created by Claude Code with inspiration from Jerrypm.
For issues, questions, or feature requests, please refer to the project documentation or contact the development team.
Enjoy reading your markdown files! 📚✨