diff --git a/.gitignore b/.gitignore index 025317d..d5cc939 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,6 @@ build-command-json build-topics content/commands/* !content/commands/_index.md -content/docs/topics/* -!content/docs/topics/_index.md +content/topics/* +!content/topics/_index.md _site \ No newline at end of file diff --git a/README.md b/README.md index 42cc928..056379a 100644 --- a/README.md +++ b/README.md @@ -39,11 +39,11 @@ The instructions show how to use scripts that create symbolic links to the `valk ### Building the documentation topics -Documentation 'topics' (i.e. `/docs/topics/keyspace/`, `/docs/topics/encryption/`, `/docs/topics/transactions/`) sources content from `valkey-io/valkey-doc`. +Documentation 'topics' (i.e. `/topics/keyspace/`, `/topics/encryption/`, `/topics/transactions/`) sources content from `valkey-io/valkey-doc`. ```mermaid flowchart TD - A[Webpage: /docs/topics/keyspace/ ] + A[Webpage: /topics/keyspace/ ] A --> B[Template: valkey-io/valkey-website] B --> H[Repo: valkey-io/valkey-doc ] --> I[File: /topics/keyspace.md ] --> Y[Topic content] ``` @@ -58,7 +58,7 @@ From the root directory of this repo run: ``` Then, restart Zola. -Point your browser at `http://127.0.0.1:1111/docs/topics/` and you should see the fully populated list of topics. +Point your browser at `http://127.0.0.1:1111/topics/` and you should see the fully populated list of topics. All files created in this process are ignored by git. Commit your changes to your local copy of `valkey-io/valkey-doc`. diff --git a/build/init-topics.sh b/build/init-topics.sh index 05c3c21..d2e083c 100755 --- a/build/init-topics.sh +++ b/build/init-topics.sh @@ -1,6 +1,6 @@ #!/bin/bash # See README for usage -# This file will create stub files for all the docs/topics. +# This file will create stub files for all the topics. # first check to make sure there are arguments if [ -z "$1" ]; then @@ -14,28 +14,37 @@ if [ ! -d "$1" ]; then exit 1 fi +# check for old style /docs/topics +if [ -e "content/docs/topics" ]; then + echo "Documentation topic files have moved. Delete content/docs/topics before proceeding." + exit 1 +fi -ln -s $1 ./build-topics +# Create symlink to topics, except if it already exists and points to the same directory. +if [ ! -L build-topics -o "$(readlink build-topics)" != "$1" ]; then + ln -s $1 ./build-topics +fi for fname in $(find $1 -maxdepth 1 -iname "*.md") do base=${fname##*/} topic=${base%.*} - if [[ "$topic" != "index" ]]; then - cat << EOF > "./content/docs/topics/$topic.md" + if [[ "$topic" != "index" ]]; then + cat << EOF > "./content/topics/$topic.md" +++ # This is a generated stub file. # To edit the content see /topic/$topic.md in the 'valkey-doc' repo +aliases = ["/docs/topics/$topic/"] +++ EOF fi done -echo "Topic stub files created." +echo "Topic stub files created at content/topics." for fname in $(find $1 -maxdepth 1 -iname "*.png" -o -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.gif") do base=${fname##*/} - cp ${fname} ./content/docs/topics/${base} + cp ${fname} ./content/topics/${base} done -echo "Copied images to topics directory." \ No newline at end of file +echo "Copied images to topics directory." diff --git a/config.toml b/config.toml index 4446825..20b1617 100644 --- a/config.toml +++ b/config.toml @@ -1,4 +1,5 @@ base_url = "https://valkey.io" +title = "Valkey" compile_sass = true @@ -19,40 +20,40 @@ command_json_path = "../build-command-json/" doc_topic_path = "../build-topics/" review_list = [ - "/docs/topics/license/", - "/docs/topics/admin/", - "/docs/topics/distlock/", - "/docs/topics/eval-intro/", - "/docs/topics/faq/", - "/docs/topics/functions-intro/", - "/docs/topics/hashes/", - "/docs/topics/internals-eventlib/", - "/docs/topics/internals-vm/", - "/docs/topics/internals/", - "/docs/topics/latency/", - "/docs/topics/lua-api/", - "/docs/topics/modules-blocking-ops/", - "/docs/topics/modules-intro/", - "/docs/topics/pipelining/", - "/docs/topics/programmability/", - "/docs/topics/protocol/", - "/docs/topics/pubsub/", - "/docs/topics/rdd/", - "/docs/topics/replication/", - "/docs/topics/security/", - "/docs/topics/sentinel-clients/", - "/docs/topics/sentinel/", - "/docs/topics/transactions/", - "/docs/topics/cluster-spec/", - "/docs/topics/history/" + "/topics/license/", + "/topics/admin/", + "/topics/distlock/", + "/topics/eval-intro/", + "/topics/faq/", + "/topics/functions-intro/", + "/topics/hashes/", + "/topics/internals-eventlib/", + "/topics/internals-vm/", + "/topics/internals/", + "/topics/latency/", + "/topics/lua-api/", + "/topics/modules-blocking-ops/", + "/topics/modules-intro/", + "/topics/pipelining/", + "/topics/programmability/", + "/topics/protocol/", + "/topics/pubsub/", + "/topics/rdd/", + "/topics/replication/", + "/topics/security/", + "/topics/sentinel-clients/", + "/topics/sentinel/", + "/topics/transactions/", + "/topics/cluster-spec/", + "/topics/history/" ] publish_hold = [ - "/docs/topics/protocol/", - "/docs/topics/license/", - "/docs/topics/internals-eventlib/", - "/docs/topics/internals-vm/", - "/docs/topics/internals/", - "/docs/topics/protocol/", - "/docs/topics/rdd/" + "/topics/protocol/", + "/topics/license/", + "/topics/internals-eventlib/", + "/topics/internals-vm/", + "/topics/internals/", + "/topics/protocol/", + "/topics/rdd/" ] \ No newline at end of file diff --git a/content/docs/index.md b/content/docs/index.md index 8ef7a6a..5aea63e 100644 --- a/content/docs/index.md +++ b/content/docs/index.md @@ -4,11 +4,11 @@ template = "fullwidth.html" page_template = "docs-page.html" +++ -* [Command Reference](../commands/) -* [All Documentation Topics](./topics/) +* [Command Reference](/commands/) +* [All Documentation Topics](/topics/) * Management - * [Persistence](/docs/topics/persistence/) + * [Persistence](/topics/persistence/) * Security - * [ACL](/docs/topics/acl/) + * [ACL](/topics/acl/) * Valkey Manual - * [Keyspace Notifications](/docs/topics/keyspace/) + * [Keyspace Notifications](/topics/keyspace/) diff --git a/content/docs/topics/_index.md b/content/topics/_index.md similarity index 74% rename from content/docs/topics/_index.md rename to content/topics/_index.md index 2587776..c759c28 100644 --- a/content/docs/topics/_index.md +++ b/content/topics/_index.md @@ -2,4 +2,5 @@ title = "Topics" template = "docs.html" page_template = "docs-page.html" +aliases = ["/docs/topics/"] +++ diff --git a/templates/default.html b/templates/default.html index 245a80f..8524446 100644 --- a/templates/default.html +++ b/templates/default.html @@ -55,4 +55,4 @@