Skip to content

A dynamic blogging platform powered by Hugo, GitHub, and Obsidian for seamless content creation and publishing.

License

Notifications You must be signed in to change notification settings

demetrebadzaradze/Second-Brain

Repository files navigation

Second Brain

Second Brain Logo

A dynamic blogging platform powered by Hugo, GitHub, and Obsidian for seamless content creation and publishing.

Table of Contents

Overview

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.

How It Works

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 custom HTML, CSS, or JavaScript.
  • GitHub Workflow:
    • Master Branch: Contains the entire project, including the Hugo site source and build pipeline.
    • Posts Branch: A clean branch for submitting new Markdown posts. A GitHub Action automatically moves posts to the content/Posts directory in the master branch and clears the posts branch.
    • For-Hosting Branch: Hosts the built static site (public folder from master) for deployment via GitHub Pages.
  • Obsidian Integration: The posts branch also includes an .obsidian configuration, enabling a custom publish command. This allows content to be pushed directly from Obsidian. A Templates folder provides pre-defined front matter for consistent, well-formatted posts.

Getting Started

Follow these steps to set up your own Second Brain blog:

Prerequisites

  • 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.

Setup Instructions

  1. 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 posts directory to ensure you my blogs are not on your site.
    • Enable GitHub Actions in the Actions tab of your forked repository.
  2. 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/).
  3. 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.toml files here and here and also here.
  4. 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.
  5. Set Up Locally with Obsidian:

    • Clone your forked repository:
    git clone <your-repo-url.git>
    • Open the repository in Obsidian.
    • Retain the existing .obsidian folder, which includes plugins for publishing (e.g., shell commands for Git integration).
    • to publish a post, use Obsidian’s command palette (Ctrl+P), type publish, and run the command.
    • Optionally, create templates in a Templates folder for consistent post formatting:
    ---
    title: {{title}}
    description: Enter a description here
    date: {{date}}
    draft: false
    toc: true
    ShowLastmod: true
    ---

Why Use Second Brain?

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.

Future Plans

  • 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.

Contributing

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.

License

About

A dynamic blogging platform powered by Hugo, GitHub, and Obsidian for seamless content creation and publishing.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages