...
This commit is contained in:
parent
84c656983a
commit
f938e8ff6b
@ -63,9 +63,14 @@ impl Collection {
|
||||
// Delete existing collection data if any
|
||||
println!("DEBUG: Deleting existing collection data from Redis key 'collections:{}'", self.name);
|
||||
self.storage.delete_collection(&self.name)?;
|
||||
|
||||
// Store the collection's path in Redis
|
||||
// Store the collection's full absolute path in Redis
|
||||
let absolute_path = std::fs::canonicalize(&self.path)
|
||||
.unwrap_or_else(|_| self.path.clone())
|
||||
.to_string_lossy()
|
||||
.to_string();
|
||||
|
||||
println!("DEBUG: Storing collection path in Redis key 'collections:{}:path'", self.name);
|
||||
self.storage.store_collection_path(&self.name, &absolute_path)?;
|
||||
self.storage.store_collection_path(&self.name, &self.path.to_string_lossy())?;
|
||||
|
||||
// Walk through the directory
|
||||
|
@ -1 +0,0 @@
|
||||
name = "Grid Documentation"
|
8
examples/grid1/include_example.md
Normal file
8
examples/grid1/include_example.md
Normal file
@ -0,0 +1,8 @@
|
||||
# Include Example
|
||||
|
||||
This file demonstrates the include functionality of doctree.
|
||||
|
||||
## Including content from Introduction.md
|
||||
|
||||
!!include grid1:introduction.md
|
||||
|
19
include_example.sh
Executable file
19
include_example.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# Change to the directory where the script is located
|
||||
cd "$(dirname "$0")"
|
||||
# Exit immediately if a command exits with a non-zero status
|
||||
set -e
|
||||
|
||||
cd doctreecmd
|
||||
|
||||
# First, scan the collections with a specific doctree name
|
||||
echo "=== Scanning Collections with doctree name 'include_demo' ==="
|
||||
cargo run -- scan ../examples --doctree include_demo
|
||||
|
||||
# List the collections
|
||||
echo -e "\n=== Listing Collections ==="
|
||||
cargo run -- list --doctree include_demo
|
||||
|
||||
# Get the document with includes in markdown format
|
||||
echo -e "\n=== Getting Document with Includes (Markdown) ==="
|
||||
cargo run -- get -c grid1 -p include_example.md --doctree include_demo
|
Loading…
Reference in New Issue
Block a user