diff --git a/README.md b/README.md index 229f9cf..a51d69a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Supports content-md format for AI Agents](https://contentmd.org/badge.svg)](https://contentmd.org) + # Content-md [content-md](https://contentmd.org) is an open specification for structuring content to be consumed by AI agents. @@ -8,8 +10,9 @@ Content-md synthesizes the current practices of structuring the markdown represe - **[Documentation](https://contentmd.org)** — Motivation, guides and tutorials - **[Specification](https://contentmd.org/specification)** — Format details +- **[`contentmd` Command Line](https://contentmd.org/cli)** — Fetch and validate markdown -This repo contains the specification, documentation, and reference guides. +This repo contains the specification, documentation, reference guides, and the Rust command line. ## About diff --git a/config.php b/config.php index 0a77c51..a8e6d7b 100644 --- a/config.php +++ b/config.php @@ -25,4 +25,15 @@ return '/' . trimPath($path); }, + + 'isActive' => function ($page, $path) { + $pagePath = str_replace('\\', '/', trimPath($page->getPath())); + $path = trimPath($path); + + if(Str::endsWith($path, '*')){ + $path = rtrim($path, '*'); + return Str::startsWith($pagePath, $path) || $pagePath === $path; + } + return Str::endsWith($pagePath, $path) || $pagePath === $path; + }, ]; diff --git a/source/_components/code-snippet.blade.php b/source/_components/code-snippet.blade.php new file mode 100644 index 0000000..07873ed --- /dev/null +++ b/source/_components/code-snippet.blade.php @@ -0,0 +1,7 @@ +
+ {{ $slot }} + +
\ No newline at end of file diff --git a/source/_components/nav-link.blade.php b/source/_components/nav-link.blade.php new file mode 100644 index 0000000..686734c --- /dev/null +++ b/source/_components/nav-link.blade.php @@ -0,0 +1 @@ + $active ?? false]) class="">{{ $slot }} \ No newline at end of file diff --git a/source/_layouts/main.blade.php b/source/_layouts/main.blade.php index c03b2ee..895cfbe 100644 --- a/source/_layouts/main.blade.php +++ b/source/_layouts/main.blade.php @@ -29,7 +29,6 @@ - @@ -105,10 +104,11 @@ class="ignore-agent shadow-xl z-50 fixed bottom-3.5 right-3.5 border border-zinc