-
Notifications
You must be signed in to change notification settings - Fork 182
Site: Rework Lua API appearance and functionality #2570
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
Open
SlashScreen
wants to merge
35
commits into
beyond-all-reason:master
Choose a base branch
from
SlashScreen:site_formatting_template
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
6630a55
monolithic lua API, working on styling and usability
SlashScreen 4dd450c
More maintainable templates. Now... analysis and toc
SlashScreen f5f5c6d
added permalinks
SlashScreen 87651e8
got the arrows to display inline
SlashScreen 3d4e291
with great strife I have generated a TOC
SlashScreen 27385a9
ok got permalinks working well enough
SlashScreen 685019c
toc style pass
SlashScreen f9e0c02
added type backlinking
SlashScreen 4801a9c
Added TOCs to the other generated pages, fixed links I hope
SlashScreen 7dc085e
remove ruby stuff. dorry badosu
SlashScreen 67b9645
lining up and polish
SlashScreen 3200cdf
Fixed backlinks enough, supporting generics I think?
SlashScreen 379bdb6
fixed a lot of bugs
SlashScreen 99d3e53
fixed a bunch of spacing issues
SlashScreen 97af4ed
used styles instead
SlashScreen f00ea1a
working on getting CI to work
SlashScreen 0f30a3d
Merge branch 'master' into site_formatting_template
SlashScreen 41c2d49
fixed type linking. kind of a bandaid solution. If it doesn't work ag…
SlashScreen 724867c
Merge branch 'site_formatting_template' of github.com:SlashScreen/Rec…
SlashScreen 2bc0cfc
tweaks 1
SlashScreen 9f9122b
removed duplicate property and type tables
SlashScreen 662e5c3
more link fixes, added the permalink bump thing
SlashScreen 54738a3
type renderign works, now permalinks
SlashScreen 804079f
rethinking how globals are generated
SlashScreen 45bd1a3
side quest: promote forum
SlashScreen 4e7e056
1st draft of refactor. probably extremely broken
SlashScreen e72f2ae
working through bugs
SlashScreen 1c66bdc
ironing out more bugs
SlashScreen 011b359
ok maybe wasn't the right approach
SlashScreen 81f3999
complete structural rethinking. see will be difficult. Have a few bugs
SlashScreen d9b3802
added method support
SlashScreen e399859
fixed types
SlashScreen c8cfde4
ok see kinda works now
SlashScreen 5d148e4
formatting changes
SlashScreen b4ea30e
bump emmylua version
SlashScreen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,13 @@ | ||
{{ $result := dict }} | ||
|
||
{{ $root_name := .root_name }} | ||
|
||
{{ range .data }} | ||
{{ $type := .type }} | ||
{{ $name := (delimit (slice $root_name "." .name)) "." "-" }} | ||
{{ $permalink := printf "%s-%s" $type $name }} | ||
{{ $result = merge $result (dict $name $permalink) }} | ||
{{ $result = merge $result (partial "analyze_globals.html" (dict "data" .members "root_name" $name))}} | ||
{{ end }} | ||
|
||
{{ return $result }} |
This file contains hidden or 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 hidden or 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,32 @@ | ||
{{/* | ||
member: { | ||
name: string | ||
permalink: string | ||
description: string | ||
deprecation_reason: string? | ||
generics: []string | ||
loc: { | ||
file: string | ||
line: integer | ||
} | ||
literal: string? | ||
path: []string | ||
} | ||
table: member { | ||
type: "table" | ||
members: []member | ||
} | ||
field: member | ||
func: member { | ||
params: []{ | ||
name: string | ||
typ: string | ||
desc: string? | ||
} | ||
returns: []{ | ||
name: string | ||
typ: string | ||
desc: string? | ||
} | ||
} | ||
*/}} |
This file contains hidden or 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
15 changes: 15 additions & 0 deletions
15
doc/site/layouts/partials/global_construction/construct_field.html
This file contains hidden or 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,15 @@ | ||
{{ $data := .data }} | ||
{{ $path := .path }} {{/* path appended in construct_member */}} | ||
|
||
{{ $field := (dict | ||
"type" "field" | ||
"name" $data.name | ||
"description" $data.description | ||
"deprecation_reason" $data.deprecation_reason | ||
"loc" $data.loc | ||
"method" $data.is_meth | ||
"permalink" (printf "field-%s" (replace (delimit $path "-") "." "-")) | ||
"type" (partial "extract_type_name.html" .typ) | ||
)}} | ||
|
||
{{ return $field }} |
34 changes: 34 additions & 0 deletions
34
doc/site/layouts/partials/global_construction/construct_function.html
This file contains hidden or 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 @@ | ||
{{ $data := .data }} | ||
{{ $path := .path }} {{/* path appended in construct_member */}} | ||
|
||
{{ $fn := (dict | ||
"type" "fn" | ||
"name" $data.name | ||
"description" $data.description | ||
"deprecation_reason" $data.deprecation_reason | ||
"loc" $data.loc | ||
"method" $data.is_meth | ||
"permalink" (printf "fn-%s" (replace (delimit $path "-") "." "-")) | ||
)}} | ||
|
||
{{ $params := slice }} | ||
{{ range $data.params }} | ||
{{ $params = append $params (dict | ||
"name" $data.name | ||
"type" (partial "extract_type_name.html" .typ) | ||
"desc" $data.desc | ||
) }} | ||
{{ end }} | ||
{{ $fn = merge $fn (dict "params" $params) }} | ||
|
||
{{ $returns := slice }} | ||
{{ range $data.returns }} | ||
{{ $returns = append $returns (dict | ||
"name" $data.name | ||
"type" (partial "extract_type_name.html" .typ) | ||
"desc" $data.desc | ||
) }} | ||
{{ end }} | ||
{{ $fn = merge $fn (dict "returns" $returns) }} | ||
|
||
{{ return $fn }} |
14 changes: 14 additions & 0 deletions
14
doc/site/layouts/partials/global_construction/construct_member.html
This file contains hidden or 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,14 @@ | ||
{{ $data := .data }} | ||
{{ $path := append .data.name .path }} | ||
|
||
{{ $res := dict }} | ||
|
||
{{ if eq .type "table" }} | ||
{{ $res = (partial "global_construction/construct_table.html" (dict "data" $data "path" (append $data.name $path))) }} | ||
{{ else if eq .type "fn" }} | ||
{{ $res = (partial "global_construction/construct_function.html" (dict "data" $data "path" (append $data.name $path))) }} | ||
{{ else if eq .type "field" }} | ||
{{ $res = (partial "global_construction/construct_field.html" (dict "data" $data "path" (append $data.name $path))) }} | ||
{{ end }} | ||
|
||
{{ return $res }} |
20 changes: 20 additions & 0 deletions
20
doc/site/layouts/partials/global_construction/construct_table.html
This file contains hidden or 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,20 @@ | ||
{{ $data := .data }} | ||
{{ $path := .path }} {{/* path appended in construct_member */}} | ||
|
||
{{ $table := (dict | ||
"type" "table" | ||
"name" $data.name | ||
"description" $data.description | ||
"deprecation_reason" $data.deprecation_reason | ||
"loc" $data.loc | ||
"permalink" (printf "table-%s" (replace (delimit $path "-") "." "-")) | ||
) }} | ||
|
||
{{ $members := slice }} | ||
{{ range .members }} | ||
{{ $members := append (partial "global_construction/construct_member.html" (dict "data" . "path" (append $data.name $path)) ) }} | ||
{{ end }} | ||
|
||
{{ $table = merge $table (dict "members" $members) }} | ||
|
||
{{ return $table }} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like something that could be raised with emmylua (or even PR'd in) rather than hacked around here. Just a thought.