From f73038c4f22ae52ab0673cb03dad5e72b8f857ec Mon Sep 17 00:00:00 2001 From: sogaiu <983021772@users.noreply.github.com> Date: Sat, 15 Jun 2024 13:39:32 +0900 Subject: [PATCH] Remove community example links from some docs --- content/api/gen-docs.janet | 9 ++++++--- content/api/jpm/cc.mdz | 1 + content/api/jpm/cgen.mdz | 1 + content/api/jpm/cli.mdz | 1 + content/api/jpm/commands.mdz | 1 + content/api/jpm/config.mdz | 1 + content/api/jpm/dagbuild.mdz | 1 + content/api/jpm/index.mdz | 1 + content/api/jpm/make-config.mdz | 1 + content/api/jpm/pm.mdz | 1 + content/api/jpm/rules.mdz | 1 + content/api/jpm/scaffold.mdz | 1 + content/api/jpm/shutil.mdz | 1 + content/api/spork/argparse.mdz | 1 + content/api/spork/base64.mdz | 1 + content/api/spork/crc.mdz | 1 + content/api/spork/cron.mdz | 1 + content/api/spork/ev-utils.mdz | 1 + content/api/spork/fmt.mdz | 1 + content/api/spork/generators.mdz | 1 + content/api/spork/getline.mdz | 1 + content/api/spork/htmlgen.mdz | 1 + content/api/spork/http.mdz | 1 + content/api/spork/httpf.mdz | 1 + content/api/spork/index.mdz | 1 + content/api/spork/json.mdz | 1 + content/api/spork/math.mdz | 1 + content/api/spork/misc.mdz | 1 + content/api/spork/msg.mdz | 1 + content/api/spork/netrepl.mdz | 1 + content/api/spork/path.mdz | 1 + content/api/spork/rawterm.mdz | 1 + content/api/spork/regex.mdz | 1 + content/api/spork/rpc.mdz | 1 + content/api/spork/schema.mdz | 1 + content/api/spork/sh.mdz | 1 + content/api/spork/tarray.mdz | 1 + content/api/spork/test.mdz | 1 + content/api/spork/zip.mdz | 1 + 39 files changed, 44 insertions(+), 3 deletions(-) diff --git a/content/api/gen-docs.janet b/content/api/gen-docs.janet index af064c33..d80122e3 100644 --- a/content/api/gen-docs.janet +++ b/content/api/gen-docs.janet @@ -86,7 +86,8 @@ (type val)) docstring (remove-extra-spaces docstring) source-linker (dyn :source-linker janet-source-linker) - example (check-example key)] + example (check-example key) + c-example (not (dyn :no-community-examples))] {:tag "div" "class" "binding" :content [{:tag "span" "class" "binding-sym" "id" key :content key} " " {:tag "span" "class" "binding-type" :content binding-type} " " @@ -98,8 +99,10 @@ ;(if example [{:tag "div" "class" "example-title" :content "EXAMPLES"} {:tag "pre" "class" "mendoza-codeblock" :content {:tag "code" :language (require "janet.syntax") :content (string example)}}] []) - - {:tag "a" "href" (string "https://janetdocs.com/" (jdoc-escape key)) :content "Community Examples"}]})) + (if c-example + {:tag "a" "href" + (string "https://janetdocs.com/" (jdoc-escape key)) + :content "Community Examples"})]})) (defn- all-entries [&opt env] diff --git a/content/api/jpm/cc.mdz b/content/api/jpm/cc.mdz index 3bbc7ae3..c012d7d2 100644 --- a/content/api/jpm/cc.mdz +++ b/content/api/jpm/cc.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import jpm/cc :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/jpm" gen-docs/jpm-version)) +(setdyn :no-community-examples true) {:title "C Compiler" :nav-title "cc" diff --git a/content/api/jpm/cgen.mdz b/content/api/jpm/cgen.mdz index b5d053c4..e3616c04 100644 --- a/content/api/jpm/cgen.mdz +++ b/content/api/jpm/cgen.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import jpm/cgen :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/jpm" gen-docs/jpm-version)) +(setdyn :no-community-examples true) {:title "C Source Generation" :nav-title "cgen" diff --git a/content/api/jpm/cli.mdz b/content/api/jpm/cli.mdz index 2f82c741..d2044448 100644 --- a/content/api/jpm/cli.mdz +++ b/content/api/jpm/cli.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import jpm/cli :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/jpm" gen-docs/jpm-version)) +(setdyn :no-community-examples true) {:title "Command Line Interface" :nav-title "cli" diff --git a/content/api/jpm/commands.mdz b/content/api/jpm/commands.mdz index bd4ee084..f7a57e26 100644 --- a/content/api/jpm/commands.mdz +++ b/content/api/jpm/commands.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import jpm/commands :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/jpm" gen-docs/jpm-version)) +(setdyn :no-community-examples true) {:title "Commands" :nav-title "commands" diff --git a/content/api/jpm/config.mdz b/content/api/jpm/config.mdz index 857d99ae..a561dece 100644 --- a/content/api/jpm/config.mdz +++ b/content/api/jpm/config.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import jpm/config :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/jpm" gen-docs/jpm-version)) +(setdyn :no-community-examples true) {:title "Config" :nav-title "config" diff --git a/content/api/jpm/dagbuild.mdz b/content/api/jpm/dagbuild.mdz index 7f9099ed..8a7b13af 100644 --- a/content/api/jpm/dagbuild.mdz +++ b/content/api/jpm/dagbuild.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import jpm/dagbuild :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/jpm" gen-docs/jpm-version)) +(setdyn :no-community-examples true) {:title "DAG Build" :nav-title "dagbuild" diff --git a/content/api/jpm/index.mdz b/content/api/jpm/index.mdz index b07ed916..bb49fe06 100644 --- a/content/api/jpm/index.mdz +++ b/content/api/jpm/index.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import jpm :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/jpm" gen-docs/jpm-version)) +(setdyn :no-community-examples true) {:title "JPM" :nav-title "jpm" diff --git a/content/api/jpm/make-config.mdz b/content/api/jpm/make-config.mdz index 17ac267c..db16894a 100644 --- a/content/api/jpm/make-config.mdz +++ b/content/api/jpm/make-config.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import jpm/make-config :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/jpm" gen-docs/jpm-version)) +(setdyn :no-community-examples true) {:title "Configuration Generation" :nav-title "make-config" diff --git a/content/api/jpm/pm.mdz b/content/api/jpm/pm.mdz index fbb72045..ce24022b 100644 --- a/content/api/jpm/pm.mdz +++ b/content/api/jpm/pm.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import jpm/pm :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/jpm" gen-docs/jpm-version)) +(setdyn :no-community-examples true) {:title "Project Management" :nav-title "pm" diff --git a/content/api/jpm/rules.mdz b/content/api/jpm/rules.mdz index 84ed08e4..c0846dec 100644 --- a/content/api/jpm/rules.mdz +++ b/content/api/jpm/rules.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import jpm/rules :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/jpm" gen-docs/jpm-version)) +(setdyn :no-community-examples true) {:title "Build Rules" :nav-title "rules" diff --git a/content/api/jpm/scaffold.mdz b/content/api/jpm/scaffold.mdz index 82818318..cd23a3ff 100644 --- a/content/api/jpm/scaffold.mdz +++ b/content/api/jpm/scaffold.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import jpm/scaffold :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/jpm" gen-docs/jpm-version)) +(setdyn :no-community-examples true) {:title "Project Scaffolding" :nav-title "scaffold" diff --git a/content/api/jpm/shutil.mdz b/content/api/jpm/shutil.mdz index d73d1289..a5667e50 100644 --- a/content/api/jpm/shutil.mdz +++ b/content/api/jpm/shutil.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import jpm/shutil :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/jpm" gen-docs/jpm-version)) +(setdyn :no-community-examples true) {:title "Shell Utilities" :nav-title "shutil" diff --git a/content/api/spork/argparse.mdz b/content/api/spork/argparse.mdz index 52b31a25..8d2cffc5 100644 --- a/content/api/spork/argparse.mdz +++ b/content/api/spork/argparse.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/argparse :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "Argument Parsing" :nav-title "argparse" diff --git a/content/api/spork/base64.mdz b/content/api/spork/base64.mdz index a3bfb0b0..8ff76a59 100644 --- a/content/api/spork/base64.mdz +++ b/content/api/spork/base64.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/base64 :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "Base64" :nav-title "base64" diff --git a/content/api/spork/crc.mdz b/content/api/spork/crc.mdz index 321f1fdc..055605d9 100644 --- a/content/api/spork/crc.mdz +++ b/content/api/spork/crc.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/crc :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "CRC" :nav-title "crc" diff --git a/content/api/spork/cron.mdz b/content/api/spork/cron.mdz index d8b96f7a..b64a6672 100644 --- a/content/api/spork/cron.mdz +++ b/content/api/spork/cron.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/cron :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "Cron" :nav-title "cron" diff --git a/content/api/spork/ev-utils.mdz b/content/api/spork/ev-utils.mdz index 740b2ef8..cc7c24f0 100644 --- a/content/api/spork/ev-utils.mdz +++ b/content/api/spork/ev-utils.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/ev-utils :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "EV Utilities" :nav-title "ev-utils" diff --git a/content/api/spork/fmt.mdz b/content/api/spork/fmt.mdz index f965567f..c17fa3fe 100644 --- a/content/api/spork/fmt.mdz +++ b/content/api/spork/fmt.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/fmt :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "Format" :nav-title "fmt" diff --git a/content/api/spork/generators.mdz b/content/api/spork/generators.mdz index 4fce281d..4bcd7d63 100644 --- a/content/api/spork/generators.mdz +++ b/content/api/spork/generators.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/generators :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "Generators" :nav-title "generators" diff --git a/content/api/spork/getline.mdz b/content/api/spork/getline.mdz index 11a0c272..6d12f314 100644 --- a/content/api/spork/getline.mdz +++ b/content/api/spork/getline.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/getline :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "Getline" :nav-title "getline" diff --git a/content/api/spork/htmlgen.mdz b/content/api/spork/htmlgen.mdz index 25a42040..7f1c1c8e 100644 --- a/content/api/spork/htmlgen.mdz +++ b/content/api/spork/htmlgen.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/htmlgen :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "HTML Generation" :nav-title "htmlgen" diff --git a/content/api/spork/http.mdz b/content/api/spork/http.mdz index fdc9c7eb..1cb79cf9 100644 --- a/content/api/spork/http.mdz +++ b/content/api/spork/http.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/http :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "HTTP" :nav-title "http" diff --git a/content/api/spork/httpf.mdz b/content/api/spork/httpf.mdz index 5aadf336..fc2ec07b 100644 --- a/content/api/spork/httpf.mdz +++ b/content/api/spork/httpf.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/httpf :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "HTTP Framework" :nav-title "httpf" diff --git a/content/api/spork/index.mdz b/content/api/spork/index.mdz index 6ae4820f..ae120538 100644 --- a/content/api/spork/index.mdz +++ b/content/api/spork/index.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "Spork" :nav-title "spork" diff --git a/content/api/spork/json.mdz b/content/api/spork/json.mdz index c61b76ef..919b42b5 100644 --- a/content/api/spork/json.mdz +++ b/content/api/spork/json.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/json :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "JSON" :nav-title "json" diff --git a/content/api/spork/math.mdz b/content/api/spork/math.mdz index e03aa37e..99740d53 100644 --- a/content/api/spork/math.mdz +++ b/content/api/spork/math.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/math :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "Math extended" :nav-title "math" diff --git a/content/api/spork/misc.mdz b/content/api/spork/misc.mdz index 17e66397..c7ed69dd 100644 --- a/content/api/spork/misc.mdz +++ b/content/api/spork/misc.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/misc :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "Miscellaneous Functions" :nav-title "misc" diff --git a/content/api/spork/msg.mdz b/content/api/spork/msg.mdz index 0d5dcaaa..0dcfc3e7 100644 --- a/content/api/spork/msg.mdz +++ b/content/api/spork/msg.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/msg :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "Simple Messaging Protocol" :nav-title "msg" diff --git a/content/api/spork/netrepl.mdz b/content/api/spork/netrepl.mdz index 55b55330..91628a8a 100644 --- a/content/api/spork/netrepl.mdz +++ b/content/api/spork/netrepl.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/netrepl :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "NetREPL" :nav-title "netrepl" diff --git a/content/api/spork/path.mdz b/content/api/spork/path.mdz index a2002cc3..03ff227b 100644 --- a/content/api/spork/path.mdz +++ b/content/api/spork/path.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/path :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "Path Utilities" :nav-title "path" diff --git a/content/api/spork/rawterm.mdz b/content/api/spork/rawterm.mdz index 245492f1..db4b6024 100644 --- a/content/api/spork/rawterm.mdz +++ b/content/api/spork/rawterm.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/rawterm :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "Raw Terminal Functionality" :nav-title "rawterm" diff --git a/content/api/spork/regex.mdz b/content/api/spork/regex.mdz index cb77d0ac..482701b7 100644 --- a/content/api/spork/regex.mdz +++ b/content/api/spork/regex.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/regex :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "Regular Expression PEG Syntax" :nav-title "regex" diff --git a/content/api/spork/rpc.mdz b/content/api/spork/rpc.mdz index 1face877..4a5f629f 100644 --- a/content/api/spork/rpc.mdz +++ b/content/api/spork/rpc.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/rpc :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "Remote Procedure Calls" :nav-title "rpc" diff --git a/content/api/spork/schema.mdz b/content/api/spork/schema.mdz index 6a2d1e16..bcd9fdcc 100644 --- a/content/api/spork/schema.mdz +++ b/content/api/spork/schema.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/schema :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "Schema" :nav-title "schema" diff --git a/content/api/spork/sh.mdz b/content/api/spork/sh.mdz index 3e4556cb..1e01a7d3 100644 --- a/content/api/spork/sh.mdz +++ b/content/api/spork/sh.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/sh :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "Shell Utilities" :nav-title "sh" diff --git a/content/api/spork/tarray.mdz b/content/api/spork/tarray.mdz index d0907cd8..1576a965 100644 --- a/content/api/spork/tarray.mdz +++ b/content/api/spork/tarray.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/tarray :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "Typed Arrays" :nav-title "tarray" diff --git a/content/api/spork/test.mdz b/content/api/spork/test.mdz index a6b4a4ee..1fff2b4a 100644 --- a/content/api/spork/test.mdz +++ b/content/api/spork/test.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/test :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "Test" :nav-title "test" diff --git a/content/api/spork/zip.mdz b/content/api/spork/zip.mdz index 4d05f950..1912b33f 100644 --- a/content/api/spork/zip.mdz +++ b/content/api/spork/zip.mdz @@ -1,6 +1,7 @@ (import ../gen-docs :as gen-docs) (import spork/zip :export true) (setdyn :source-linker (partial gen-docs/github-source-linker "janet-lang/spork" gen-docs/spork-version)) +(setdyn :no-community-examples true) {:title "Zip Files" :nav-title "zip"