Giter VIP home page Giter VIP logo

obsidian-to-hugo-pipeline's Introduction

The goals of this project is to make a pipeline between writing posts in Obsidian.md and publishing them through Hugo. The aim is to make this process as frictionless as possible.

Structure of this project

  • test-files/obsidian-vault: This directory contains the raw .md files that would come from Obsidian. This is a place holder for the Obsidian directory we would want to monitor for new posts. Right now it just has some files you can use to test. The files in this directory are left messy on purpose to simulate the way they would come from Obsidian.
  • test-files/hugo-content: This is a representation of the content directory in a Hugo site. This would be were the content would end up after being processed by the pipeline. You can use it to verify that the pipeline is working as expected.

Project To-Do

  • Add more logging
  • Convert the steps into functions. (The sequence of functions will be run against each file, one at a time.)
  • Function to clean up the hugo directory

Current manual process

  1. Write a post in Obsidian.
  2. Make a directory under content inside a matching subdirectory (like notes) for the post.
  3. Copy the .md file from Obsidian to the new directory and rename it to index.md.
  4. Copy the thumbnail image to the new directory. The thumbnail is defined in the cover: field in the front matter of the .md file.
  5. Find any image links in the .md file and copy the images to the new directory.
  6. Rename the image links in the .md file to make more sense.
  7. Update the image links to center the images in the post.
  8. Run Hugo command to build the site.
  9. Check the site to make sure the post looks good.
  10. Run an rsync command to copy the new post to the prod server.

Future automated process

==To-Do== Mermaid diagram of the process?

Example Front Matter

This is an example of the front matter that I currently use. Some of the fields are specific to the theme that I'm using in Hugo, but I think most of them are useful. At a minimum, all we really need is title, cover.image, and type.

---
title: "Post Title"
type: "notes"
date: 2024-02-15T20:21:22Z
lastmod: 2024-02-15T20:21:22Z
draft: true
showtoc: true
defaultTheme: auto
disableThemeToggle: false
author:
  - Author
tags:
  - Tag1
  - Tag2
summary: ""
cover:
  image: cover.jpg
  relative: true
  hidden: false
---

Setting up Hugo

==To-Do==

obsidian-to-hugo-pipeline's People

Contributors

eatmorechicken avatar

Watchers

 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.