bfa0eaf68abe4e08c87d5d064a56071893acf0d8
Gobsidian
A modern, responsive web interface for viewing and editing Obsidian markdown notes, built with Go and TailwindCSS.
Features
- Responsive Design: Works seamlessly on desktop and mobile devices
- Dark Theme: Beautiful dark interface optimized for extended use
- Multiple Image Storage Modes: Flexible image storage options to match Obsidian's behavior
- File Management: Upload, download, edit, and delete files and notes
- Syntax Highlighting: Code blocks with syntax highlighting for multiple languages
- Search Functionality: Quick search through your notes
- Settings Management: Web-based configuration interface
- Markdown Rendering: Full markdown support with Obsidian-style features
Image Storage Modes
- Root Directory: Store images directly in the notes root directory
- Specific Folder: Store all images in a designated folder
- Same as Note: Store images in the same directory as the note
- Subfolder of Note: Store images in a subfolder within the note's directory
Installation
-
Clone the repository:
git clone https://github.com/yourusername/gobsidian.git cd gobsidian -
Install dependencies:
go mod download -
Run the application:
go run cmd/main.go -
Open your browser and navigate to
http://localhost:8080
Configuration
On first run, Gobsidian will create a settings.ini file with default configurations. You can modify these settings through the web interface at /settings or by editing the file directly.
Default Configuration
[FLASK]
HOST = 0.0.0.0
PORT = 8080
SECRET_KEY = change-this-secret-key
DEBUG = false
MAX_CONTENT_LENGTH = 16
[MD_NOTES_APP]
APP_NAME = Gobsidian
NOTES_DIR = notes
NOTES_DIR_HIDE_SIDEPANE = attached, images
NOTES_DIR_SKIP = secret, private
IMAGES_HIDE = false
IMAGE_STORAGE_MODE = 1
IMAGE_STORAGE_PATH = images
IMAGE_SUBFOLDER_NAME = attached
ALLOWED_IMAGE_EXTENSIONS = jpg, jpeg, png, webp, gif
ALLOWED_FILE_EXTENSIONS = txt, pdf, html, json, yaml, yml, conf, csv, cmd, bat, sh
Usage
Viewing Notes
- Navigate through your notes using the sidebar tree structure
- Click on any
.mdfile to view its rendered content - Images and links are automatically processed and displayed
Creating Notes
- Click "New Note" or use Ctrl+N
- Enter a title and content using Markdown syntax
- Save with Ctrl+S or click the Save button
Editing Notes
- Click the "Edit" button on any note
- Use the built-in editor with toolbar for common Markdown formatting
- Auto-save functionality and keyboard shortcuts available
File Management
- Upload files by dragging and dropping or using the upload button
- Download any file by clicking the download icon
- Delete files and folders with confirmation dialogs
Settings
- Access settings via the gear icon in the sidebar
- Configure image storage modes, file extensions, and directories
- Changes take effect immediately or after restart as indicated
Development
Project Structure
gobsidian/
├── cmd/
│ └── main.go # Application entry point
├── internal/
│ ├── config/ # Configuration management
│ ├── handlers/ # HTTP route handlers
│ ├── markdown/ # Markdown rendering
│ ├── models/ # Data models
│ ├── server/ # HTTP server setup
│ └── utils/ # Utility functions
├── web/
│ ├── static/ # CSS, JS, and static assets
│ └── templates/ # HTML templates
├── notes/ # Default notes directory
├── go.mod # Go module definition
└── settings.ini # Configuration file
Building
To build a standalone binary:
go build -o gobsidian cmd/main.go
Docker
To run with Docker:
docker build -t gobsidian .
docker run -p 8080:8080 -v /path/to/your/notes:/app/notes gobsidian
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Inspired by Obsidian's excellent note-taking capabilities
- Built with Go, Gin, TailwindCSS, and highlight.js
- Thanks to the open source community for the excellent libraries used
Comparison with Python Flask Version
This Go implementation provides the same functionality as the original Python Flask version with the following improvements:
- Better Performance: Go's compiled nature and efficient concurrency
- Single Binary: No need for Python interpreter or virtual environments
- Lower Memory Usage: More efficient resource utilization
- Modern UI: Updated with TailwindCSS for better responsiveness
- Enhanced Mobile Support: Better touch interface and responsive design
Future Enhancements
- Real-time collaborative editing
- Plugin system for extensions
- Full-text search with indexing
- Note linking and backlinks
- Export functionality (PDF, HTML)
- Themes and customization options
- REST API for external integrations
Description
1.0.1
Latest
Languages
HTML
52.6%
Go
43.9%
JavaScript
2.9%
CSS
0.4%
Makefile
0.2%