Giter Club home page Giter Club logo

obsidian-to-hugo-pages's Introduction

Usage

Simply do a git push. Hugo static content is generated within the Github runner.

Installation

Note: A detailed tutorial can be found here

  1. Place Obsidian vault within a correctly setup Github pages repository. If a Hugo site has not been generated, run hugo new site.
  2. Create an Github action in the repository, e.g..github/workflows/main.yml with the following contents. Note vault-path should be changed to the directory name of the Obsidian vault:
name: Deploy from Obsidian notes

on:
  push:
    branches:
      - main

jobs:
  publish_job:
    runs-on: ubuntu-latest
    name: Publish Obsidian notes to Github pages
    steps:
      - uses: x1sec/obsidian-to-hugo-action@main
        with:
          vault-path: myvault
          github-token: ${{ secrets.GITHUB_TOKEN }}
  1. Ensure the repository workflows permissions for the Github actions on the repository is set to Read and write. This can be found in Settings under the repository name, Actions, General. Reference

Further details

The conversion from Obsidian Markdown to Hugo is done by running obsidian-export and adding a modification to the default template layout to fix relative URIs for links and images embedded in the Obsidian notes. Hugo generation uses the workflow hugo-setup

Please feel free to reach out to me on Twitter if you have any issues.

obsidian-to-hugo-pages's People

Contributors

haxrob avatar tolejarczuk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.