-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #904 from quanb-duy/api-ref_shortcode
- Loading branch information
Showing
16 changed files
with
139 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ linkTitle: "LINK" | |
no_list: true | ||
--- | ||
|
||
{{< python-class "PATH" >}} | ||
{{< api-ref-class "PATH" >}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ superheading: "PARENT." | |
weight: 100 | ||
--- | ||
|
||
{{< python "PATH" >}} | ||
{{< api-ref "PATH" >}} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{{ $page := . }} | ||
{{ $dirpath := (partial "version.html" (dict "context" .)).dirpath }} | ||
|
||
{{ $jsonPath := printf "versioned_docs/%s/data.json" $dirpath }} | ||
|
||
{{ if fileExists $jsonPath }} | ||
|
||
{{ with getJSON $jsonPath }} | ||
{{ $data := . }} | ||
{{ with getJSON (printf "versioned_docs/%s/links.json" $dirpath) }} | ||
{{ $links := . }} | ||
<style> | ||
html { | ||
scroll-behavior: smooth; | ||
} | ||
</style> | ||
<div class="python-api-ref-link"> | ||
{{ range $name, $data := $links }} | ||
{{ $path := $data.path }} | ||
<span style="top: -250px; position: relative;" id="{{ $path }}"></span> | ||
{{ partial "api-ref-partial.html" $path }} | ||
{{ end }} | ||
</div> | ||
{{ end }} | ||
{{ end }} | ||
|
||
{{ else }} | ||
Missing data.json for this version! | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{ partial "api-ref-link-partial.html" (dict "paragraph" (index .Params 0) "context" .Page)}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{{ $page := .Page }} | ||
{{ $path := split (.Get 0) "." }} | ||
{{ $version := partial "version.html" (dict "context" $page)}} | ||
{{ $jsonPath := printf "versioned_docs/%s/data.json" $version.dirpath }} | ||
|
||
{{ if fileExists $jsonPath }} | ||
|
||
{{ if and $version $version.dirpath }} | ||
{{ with getJSON $jsonPath }} | ||
{{ $currentData := .}} | ||
{{ range $path }} | ||
{{ if (eq $currentData.kind "class") }} | ||
{{ $currentData = $currentData.functions }} | ||
{{ end }} | ||
{{$currentData = index $currentData .}} | ||
{{ end }} | ||
|
||
{{ $objData := $currentData }} | ||
|
||
|
||
<div class="python-ref"> | ||
{{ partial "api-ref-object-partial.html" (dict "object" $objData "path" $path "context" $page) }} | ||
</div> | ||
{{ end }} | ||
|
||
{{ else }} | ||
|
||
Problem parsing the data.json! | ||
|
||
{{ end }} | ||
|
||
{{ else }} | ||
Missing data.json for this version! | ||
{{ end }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ linkTitle: "LINK" | |
no_list: true | ||
--- | ||
|
||
{{< python-module "PATH" >}} | ||
{{< api-ref-module "PATH" >}} |