Skip to content

Commit

Permalink
Merge pull request #221 from sogaiu/community-examples-link-issue
Browse files Browse the repository at this point in the history
Remove community example links from some docs
  • Loading branch information
bakpakin authored Jun 15, 2024
2 parents e4a7d55 + f73038c commit 2cb08c2
Show file tree
Hide file tree
Showing 39 changed files with 44 additions and 3 deletions.
9 changes: 6 additions & 3 deletions content/api/gen-docs.janet
Original file line number Diff line number Diff line change
Expand Up @@ -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} " "
Expand All @@ -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]
Expand Down
1 change: 1 addition & 0 deletions content/api/jpm/cc.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/jpm/cgen.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/jpm/cli.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/jpm/commands.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/jpm/config.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/jpm/dagbuild.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/jpm/index.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/jpm/make-config.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/jpm/pm.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/jpm/rules.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/jpm/scaffold.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/jpm/shutil.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/argparse.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/base64.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/crc.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/cron.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/ev-utils.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/fmt.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/generators.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/getline.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/htmlgen.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/http.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/httpf.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/index.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/json.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/math.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/misc.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/msg.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/netrepl.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/path.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/rawterm.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/regex.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/rpc.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/schema.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/sh.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/tarray.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/test.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions content/api/spork/zip.mdz
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 2cb08c2

Please sign in to comment.