Skip to main content

Converts Obsidian.md vaults to a static site

Project description

Vault to site

A program to convert Obsidian vaults into a static site. You can see an example of finished site with the default theme here. At the moment only the basic features of Obsidian are implemented and the program will fail to render certain things correctly, such as resizing an image as shown below.

![[image.jpg|size]]

You can put these in as issues on github as you find them and when I have the time I'll work on adding them. Or, you can fork it and build it out how you want.

Installation

Using pip

This is the easiest way.

pip install vault2site

Then just use as you would a normal console app:

vault2site <vault path> <output path>

From source

This assumes you'll be installing it to a virtual environment.

git clone https://github.com/kilroyjones/vault2site
cd vault2site
virtualenv -p python3 venv
. venv/bin/activate
pip install -r requirements.txt

From this point you can run the program as follows:

python app/vault2site/main.py <vault path> <output path>

Or, alternatively you can use pip and install it:

cd app
pip install .

Then, same as using pip you can run it as:

vault2site <vault path> <output path>

Usage

To convert your vault you should first include the .themes folder from the demo_vault folder in this repo into the root folder of your Obsidian vault. The .themes folder contains two files:

.themes
  ├─ page.css
  ├─ page.html

The above folder will not be visible from within Obsidian, as it hide files starting with periods by default.

Modifying the theme

The current theme is easily modified by changing the CSS (page.css), but the page.html file, when modified, should still contain the items {{header}}, {{menu}}, and {{body}} or the program won't run.

Add extensions

Currently working on allowing external extensions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vault2site-0.0.2.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vault2site-0.0.2-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file vault2site-0.0.2.tar.gz.

File metadata

  • Download URL: vault2site-0.0.2.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for vault2site-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e9a08a3339f79f71599f891668725b3a10b53323a547ded4c638e1bf7705471f
MD5 1caa80a07015b382a50b4e0a2c773800
BLAKE2b-256 adee82e48a1dcd95db55007ceeafe20b724ffd23bbc50c97e8224a411b996d61

See more details on using hashes here.

File details

Details for the file vault2site-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: vault2site-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for vault2site-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 31e12f17e86ac2cd58abb4d51235b21c4828d6266134336b162ae54fd7e4050a
MD5 0bbdf1e8f580244b8b9f1d04e4fd59b3
BLAKE2b-256 007724546d0ce80ef30e1bc3f20bc7d1d67da9525d0612ccf7748dba74090d3f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page