Index: /trunk/cli/convert.ml
===================================================================
--- /trunk/cli/convert.ml	(revision 20)
+++ /trunk/cli/convert.ml	(revision 21)
@@ -40,6 +40,5 @@
 
 let load_kv dir =
-	let conf = Filename.concat dir ".convert.conf" in (* TODO: better name? *)
-	let kv = if Sys.file_exists conf then File_store.of_kv_file conf else Store.KV.empty in
+	let kv = File_store.of_kv_file () in
 	let idx = Filename.concat dir "index.pck" in
 	if not (Sys.file_exists idx) then kv else
@@ -49,5 +48,5 @@
 			let kv = if Store.KV.mem "Id" kv then kv else Store.KV.add "Id" info.Header_pack.id kv in
 			let kv = if Store.KV.mem "Title" kv then kv else Store.KV.add "Title" info.Header_pack.title kv in
-			let kv = Store.KV.add "Locations" (String.concat ";\n" info.Header_pack.locations) kv in
+			let kv = if Store.KV.mem "Locations" kv then kv else Store.KV.add "Locations" (String.concat ";\n" info.Header_pack.locations) kv in
 			let kv = Store.KV.add "Peers" (String.concat ";\n" Header_pack.(to_str_list peers)) kv in
 			kv
Index: /trunk/cli/html.ml
===================================================================
--- /trunk/cli/html.ml	(revision 20)
+++ /trunk/cli/html.ml	(revision 21)
@@ -28,5 +28,5 @@
 	let header = match htm.templates.header with 
 		| Some x -> replace x
-		| None -> Printf.(sprintf "<header><a href='.'>%s</a></header>%s" site_title
+		| None -> Printf.(sprintf "<header><a href='.'>%s</a>%s</header>" site_title
 				(if feed <> "" then sprintf "<nav><a href='%s' id='feed'>feed</a></nav>" feed else ""))
 	in
Index: /trunk/cli/publish.ml
===================================================================
--- /trunk/cli/publish.ml	(revision 20)
+++ /trunk/cli/publish.ml	(revision 21)
@@ -1,14 +1,14 @@
 let targets () =
-	let home =
-		try Sys.getenv "txtpubdir" with Not_found ->
-		try Sys.getenv "HOME" with Not_found -> ""
+	let kv = Logarion.File_store.of_kv_file () in
+	let pub_dir =
+		try Logarion.Store.KV.find "Pubdir" kv with Not_found ->
+		try Sys.getenv "txtpubdir" with Not_found -> ""
 	in
-	List.filter
-		(fun x -> try Sys.is_directory (snd x) with Sys_error _ -> false)
-		[
-			"htm", home ^ "/public_html/txt";
-			"gmi", home ^ "/public_gemini/txt";
-			"", home ^ "/public_gopher/txt";
-		]
+	let exists_dir dir = Sys.is_directory (Filename.concat pub_dir dir) in
+	List.filter (fun x -> try exists_dir (snd x) with Sys_error _ -> false) [
+		"htm,atom", "public_html/";
+		"gmi,gmi-atom", "public_gemini/";
+		"", "public_gopher/";
+	]
 
 open Logarion
@@ -17,9 +17,11 @@
 	let targets = targets () in
 	let pub_dirs = List.map (fun x -> snd x) targets in
-	try File_store.iter ~predicate (fun (_t, p) -> File.file ((List.hd p)::pub_dirs))
-	with Unix.Unix_error (Unix.EEXIST, _, _) -> ();
-	List.iter (fun t ->
+	File_store.iter ~predicate (fun (_t, p) ->
+		try File.file ((List.hd p)::pub_dirs)
+		with Unix.Unix_error (Unix.EEXIST, _, _) -> ());
+	List.iter (fun t -> Printf.eprintf "%s %s\n" (fst t) (snd t);
 		Index.((load (snd t)) false None None None None);
-		Convert.at_path (fst t) false (snd t))
+		Convert.at_path (fst t) false (snd t);
+		prerr_endline (snd t))
 		targets
 
Index: /trunk/lib/file_store.ml
===================================================================
--- /trunk/lib/file_store.ml	(revision 20)
+++ /trunk/lib/file_store.ml	(revision 21)
@@ -4,8 +4,15 @@
 
 let extension = ".txt"
-let def_dir () = try Sys.getenv "txtdir" with Not_found ->
+
+let txtdir () = try Sys.getenv "txtdir" with Not_found ->
 	let share = Filename.concat (Sys.getenv "HOME") ".local/share/texts/" in
 	match Sys.is_directory share with true -> share
 	| false | exception (Sys_error _) -> "."
+
+let cfgpath () = match "txt.conf" with
+	| filepath when Sys.file_exists filepath -> filepath
+	| _ -> match Filename.concat (Sys.getenv "HOME") ".config/txt/txt.conf" with
+		| filepath when Sys.file_exists filepath -> filepath
+		| _ -> ""
 
 let to_string f =
@@ -81,5 +88,5 @@
 	@@ List.fold_left (fold_valid_text predicate) new_iteration flist
 
-let iter ?(r=false) ?(dir=def_dir ()) ?(predicate=fun _ -> true) ?order ?number fn =
+let iter ?(r=false) ?(dir=txtdir ()) ?(predicate=fun _ -> true) ?order ?number fn =
 	let flist = list_fs ~r dir in match order with
 	| Some comp -> List.iter fn @@ fold_sort_take ~predicate ~number comp flist
@@ -87,5 +94,5 @@
 		List.fold_left (fold_valid_text predicate) new_iteration flist
 
-let fold ?(r=false) ?(dir=def_dir ()) ?(predicate=fun _ -> true) ?order ?number fn acc =
+let fold ?(r=false) ?(dir=txtdir ()) ?(predicate=fun _ -> true) ?order ?number fn acc =
 	let flist = list_fs ~r dir in match order with
 	| Some comp -> List.fold_left fn acc @@ fold_sort_take ~predicate ~number comp flist
@@ -122,5 +129,5 @@
 	if Sys.file_exists candidate then Error "Name clash, try again" else Ok candidate
 
-let with_text ?(dir=def_dir ()) new_text =
+let with_text ?(dir=txtdir ()) new_text =
 	match id_filename dir extension new_text with
 	| Error _ as e -> e
@@ -134,5 +141,5 @@
 end
 
-let of_kv_file path =
+let of_kv_file ?(path=cfgpath ()) () =
 	let open Text_parse in
 	let subsyntaxes = Parsers.Key_value.[|
@@ -140,3 +147,4 @@
 	let of_string text acc =
 		Parser.parse subsyntaxes { text; pos = 0; right_boundary = String.length text - 1 } acc in
-	of_string (to_string @@ path) Store.KV.empty
+	if path <> "" then of_string (to_string @@ path) Store.KV.empty
+	else Store.KV.empty
Index: /trunk/lib/peers.ml
===================================================================
--- /trunk/lib/peers.ml	(revision 20)
+++ /trunk/lib/peers.ml	(revision 21)
@@ -1,3 +1,3 @@
-let text_dir = Filename.concat (File_store.def_dir ()) "peers"
+let text_dir = Filename.concat (File_store.txtdir ()) "peers"
 
 let fold fn init = match Sys.readdir text_dir with
