Skip to content

Obsidian Quartz

WARNING

Setup and Install


go install github.com/jackyzha0/hugo-obsidian@latest

git clone https://github.com/dentropy/quartz.git
cp -r /path/to/obsidian/vault/* ./quartz/content
cd quartz
git config --global --add safe.directory .      
cd content
wget https://raw.githubusercontent.com/shinyben/obsidian-quartz-sanitizer/main/main.py
python3 main.py
cd ..
# Remember to rename the root file the main page of your knowledge garden as _index.md
make serve
# checkout your site at http://localhost:1313

hugo
cd public
python3 -m http.server

Using Docker

Update Quartz's docker container

The dockerfile is in the root of the quartz directory You can add the following line to their the dockerfile to make it work

RUN git config --global --add safe.directory /quartz

Or just copy the dockerfile below one in


FROM alpine:3.16

RUN apk add --no-cache go hugo git make perl
RUN go install github.com/jackyzha0/hugo-obsidian@latest
ENV PATH="/root/go/bin:$PATH"
RUN git clone https://github.com/jackyzha0/quartz.git /quartz
RUN git config --global --add safe.directory /quartz
WORKDIR /quartz

CMD ["make", "serve"]

cat Dockerfile
docker build -t quartz-hugo .

docker-compose Add a file called docker-compose.yml


version: "3.3"
services:
  quartz-hugo:
    image: quartz-hugo
    container_name: quartz-hugo
    volumes:
      - /path/to/quartz:/quartz
    ports:
      - 1313:1313

    # optional
    environment:
      - HUGO_BIND=0.0.0.0
      - HUGO_BASEURL=http://localhost
      - HUGO_PORT=1313
      - HUGO_APPENDPORT=true
      - HUGO_LIVERELOADPORT=-1


Run docker-compose

docker-compose up 
docker-compose up -d

Notable issues