Skip to content

prcave/digital_garden

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is our knowlede repo

To build a html version of it, you'll need to get deno.

pacman -Sy deno

After that, run the ./macana.sh script which uses the macana tool to generate a static website out of the notes and places it in the gitignored html/ directory. copy it wherever you need.

Serving

We plan on hosting this notes on github pages in the near future.

In the mean time, you may use a simple golang server:

package main

import (
	"log"
	"net/http"
)

type FileServer struct {
    notesDir string
    port string
}

func NewFileServer(dir, port string) FileServer {
    return FileServer{dir, port}
}

func (f FileServer) Serve() {
	fs := http.FileServer(http.Dir(f.notesDir))
	mux := http.NewServeMux()
	mux.Handle("/notes/", http.StripPrefix("/notes", fs))

	log.Println("Serving on http://localhost+"+f.port)
	if err := http.ListenAndServe(f.port, mux); err != nil {
		log.Fatal(err)
	}
}

func main() {
  server := NewFileServer("/your_path/html/", ":8080")
  server.Serve()
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages