Fix index.md not being generated
- Generate index even when no .org files are found - Don't halt CLI early when no org files - let pipeline complete - Index will be empty but present, allowing Quartz to serve something
This commit is contained in:
@@ -306,8 +306,7 @@ defmodule OrgGarden.CLI do
|
||||
|
||||
case OrgGarden.Export.export_all(notes_dir, output_dir) do
|
||||
{:ok, 0} ->
|
||||
IO.puts("No .org files found in #{notes_dir}")
|
||||
System.halt(0)
|
||||
IO.puts(" no .org files found")
|
||||
|
||||
{:ok, count} ->
|
||||
IO.puts(" exported #{count} file(s)")
|
||||
|
||||
@@ -150,6 +150,8 @@ defmodule OrgGarden.Server do
|
||||
case OrgGarden.Export.export_all(notes_dir, output_dir) do
|
||||
{:ok, 0} ->
|
||||
Logger.warning("No .org files found in #{notes_dir}")
|
||||
# Still generate index (will be empty or have default content)
|
||||
OrgGarden.Index.generate(content_dir)
|
||||
:ok
|
||||
|
||||
{:ok, count} ->
|
||||
|
||||
Reference in New Issue
Block a user