A dynamic blogging platform powered by Hugo, GitHub, and Obsidian for seamless content creation and publishing.
Second Brain is a streamlined blogging platform hosted on GitHub, designed for creating and sharing knowledge effortlessly. It leverages Hugo for static site generation, the Hermit-v2 theme for a polished look, and Obsidian for intuitive content creation. Posts are written in Markdown and managed through Git, enabling a frictionless workflow for writers and developers alike.
Second Brain uses a combination of Hugo, GitHub, and custom Git branches to manage and deploy content:
- Hugo: Converts Markdown (.md) files into
HTML, powered by the Hermit-v2, eliminating the need for customHTML,CSS, orJavaScript. - GitHub Workflow:
MasterBranch: Contains the entire project, including the Hugo site source and build pipeline.PostsBranch: A clean branch for submitting new Markdown posts. A GitHub Action automatically moves posts to thecontent/Postsdirectory in the master branch and clears thepostsbranch.For-HostingBranch: Hosts the built static site (publicfolder frommaster) for deployment via GitHub Pages.
- Obsidian Integration: The
postsbranch also includes an.obsidianconfiguration, enabling a custompublishcommand. This allows content to be pushed directly from Obsidian. A Templates folder provides pre-defined front matter for consistent, well-formatted posts.
Follow these steps to set up your own Second Brain blog:
- A GitHub account (sign up here.
- Basic familiarity with Git and Markdown.
- Optional: Obsidian for local note-taking, content creation and predefined configuration, templates and commands.
-
Fork the Repository:
- Navigate to the Second Brain repository.
- Fork the repository, ensuring all branches are copied (uncheck "Copy the master branch only").
- Delete contents of
postsdirectory to ensure you my blogs are not on your site. - Enable GitHub Actions in the Actions tab of your forked repository.
-
Configure GitHub Pages:
- Go to Settings > Pages in your repository.
- Set the branch to For-Hosting and save. Your site will be live at the URL provided (e.g., https://.github.io/Second-Brain/).
-
Edit Configuration:
- Open the hugo.toml file in the master branch.
- Update the baseURL to your GitHub Pages URL (e.g., baseURL = "https://.github.io/Second-Brain/").
- Customize [params.author] (name and about) and [[params.socialLinks]] as desired.
- Optionally modify copyright, homeSubtitle, footerCopyright, or giturl. more configuretion option here and here and example
hugo.tomlfiles here and here and also here.
-
Add a Test Post:
- Switch to the posts branch.
- Create a new .md file with the following front matter:
--- title: Your Post Title description: Enter a description here date: 2025-01-15 draft: false toc: true ShowLastmod: true ---
- Commit and push the file. The GitHub Action will move it to the master branch and trigger a site rebuild.
-
Set Up Locally with Obsidian:
- Clone your forked repository:
git clone <your-repo-url.git>
- Open the repository in Obsidian.
- Retain the existing
.obsidianfolder, which includes plugins for publishing (e.g.,shell commandsfor Git integration). - to publish a post, use Obsidian’s command palette (
Ctrl+P), typepublish, and run the command. - Optionally, create templates in a
Templatesfolder for consistent post formatting:
--- title: {{title}} description: Enter a description here date: {{date}} draft: false toc: true ShowLastmod: true ---
Second Brain is designed to:
- Foster Creativity: Focus on generating ideas rather than storing them, exactly what brain is for.
- Share Knowledge: Make your insights accessible to others.
- Track Progress: Reflect on past work and projects. It’s ideal for developers, writers, and anyone looking to maintain a portfolio or blog with minimal setup.
- Portfolio Expansion: Showcase programming projects and technical deep dives.
- Obsidian Integration: Develop a custom Obsidian plugin for seamless post publishing without terminal or web interactions.
- Cross-Platform Support: Extend compatibility beyond Windows to macOS and Linux.
- Simplified Setup: Streamline configuration for non-technical users, reducing setup friction and merge conflicts.
- Content Ideas:
- Tutorials on home server setups.
- In-depth guide on Second Brain’s architecture.
- A roadmap for future projects.
Contributions are welcome! To suggest improvements or report issues:
- Fork the repository.
- Create a new branch for your changes.
- Submit a pull request to the master branch. leave posts untouched.
- Code: The source code, including Hugo configurations, themes, and scripts, is licensed under the MIT License.
- Blog Posts: The content in the
content/Postsdirectory is licensed under Creative Commons Attribution-NonCommercial 4.0 International License.
