-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Several (probably all) community examples links of spork functions are broken. #195
Comments
Yes, I believe:
is the case. It's been a while but IIUC janetdocs supports most of what is bundled with janet itself, but not other bits. |
Thank you for your reply @sogaiu . I'm sorry, but I'm learning janet at the moment and I'm not expert enough to contribute proposing correct and idiomatic examples. Should I close this issue or leave it open to keep it more visible? |
I don't know what might happen regarding whether the reported links should disappear or whether janetdocs might be "extended" or yet another path. ATM, I think the links to janetdocs may be a result of this line which is part of this repository. I would say to leave this issue open for the moment, but perhaps other folks have other ideas :) |
The broken links have been mentioned at the zulip instance. I don't know what's involved in removing those links. As mentioned in the previous comment, I think this line might be related. @pepe Do you have any ideas / thoughts? |
I am not sure what to do here :-(. |
It looks like the line in question is part of the return value of janet-lang.org/content/api/gen-docs.janet Line 88 in 604b786
Looks like the
May be {:tag "a" "href" (string "https://janetdocs.com/" (jdoc-escape key)) :content "Community Examples"} be part of To get this working, all of the Perhaps there is a simpler better idea. Not sure what yet though (^^; |
Ok, I tried something out: index af064c3..d80122e 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/spork/base64.mdz b/content/api/spork/base64.mdz
index a3bfb0b..8ff76a5 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" That seems to sort of work. |
I guess a similar thing applies to the jpm stuff too, e.g. at the destination such as this. |
Looks like #221 (an attempt at addressing this issue) was merged, but perhaps it's better to wait for the site to be regenerated before closing this issue (which isn't something I can do anyway :) ). |
As per title, I've tested several links in the documentation, and all were broken (404).
Just to be clear, I mean the link to the community examples at the end of each section of spork module.
As an example, the documentation section of spork argparse (https://janet-lang.org/api/spork/index.html#spork/argparse/argparse) has a link to a janetdocs.com page with community examples (https://janetdocs.com/spork/argparse/argparse) that doesn't exist.
I don't know if those links were automatically generated and the corresponding pages never existed or if those pages have been moved.
Thanks for your time and hard work!
The text was updated successfully, but these errors were encountered: