index.md
and can be overriden with --index
flagCreate a new empty directory and cd
into it or simple navigate to existing directory which has markdown files
1mkdir myblog
2cd myblog
Assuming you already went through one of the Installation methods. xlog
should be in your PATH. Simply executing it in current directory starts an HTTP server on port 3000
1xlog
The previous command starts a server on port 3000 if you want to specify the port you can do so using --bind
flag
1xlog --bind 127.0.0.1:4000
This will run the server on port 4000 instead of 3000
Xlog assumes the main page is index.md if you’re working in an existing github repository for example you may need to specify README.md as your index page as follows
1xlog --index README
Notice that specifying the index page doesn’t need the extension .md
.
Now you can navigate to http://localhost:3000 in your browser to start browsing the markdown files. if it’s a new directory you’ll be redirected to the editor to write your first page.
Note that pressing Ctrl+S
will save the page if you’re in the edit page. and also navigate to the edit page if you’re viewing a page. so you can switch between edit and view mode with Ctrl+S
and on MacOS ⌘+S
You can generate HTML files from your markdown files using --build
flag
1xlog --build .
Which will convert all of your markdown files to HTML files in the current directory.
You can specify a destination for the HTML output.
1xlog --build /destination/directory/path
If your markdown is hosted as Gituhub repository. You can use github workflows to download and execute xlog to generate HTML pages and host it with github pages.
Tutorial can be found in Create your own digital garden on Github and Examples can be found here: