Skip to content
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

Switch docs to Hextra theme #488

Merged
merged 31 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
48c446a
start rework for Hextra theme
mlange-42 Feb 10, 2025
ae31850
remove TOC, add page type
mlange-42 Feb 10, 2025
80066b2
fix code shortcodes
mlange-42 Feb 10, 2025
07969ec
markdownify in shortcode
mlange-42 Feb 10, 2025
c042600
fix tabs
mlange-42 Feb 10, 2025
1424cec
fix API ref shortcode
mlange-42 Feb 10, 2025
b18d7c3
hide generated content files
mlange-42 Feb 10, 2025
dc1242a
theme-aware images
mlange-42 Feb 10, 2025
19409aa
fix images, add logo
mlange-42 Feb 10, 2025
718593f
update images
mlange-42 Feb 10, 2025
970c764
fix links
mlange-42 Feb 10, 2025
29e53f7
fix made with arche page
mlange-42 Feb 10, 2025
e09f340
remove footer
mlange-42 Feb 10, 2025
432d79d
remove CSS files
mlange-42 Feb 10, 2025
9f80041
tweak style
mlange-42 Feb 10, 2025
f272d24
tweak benchmark tables
mlange-42 Feb 10, 2025
1091b27
full-width tables
mlange-42 Feb 10, 2025
84f88a5
tweak navi, remove footer
mlange-42 Feb 10, 2025
7079c0b
tweak font stretch and link colors
mlange-42 Feb 10, 2025
824f679
simplify CSS
mlange-42 Feb 10, 2025
865c3a7
remove generated files
mlange-42 Feb 10, 2025
fb0dc6f
adjust gitignore
mlange-42 Feb 10, 2025
0394ba1
update changelog
mlange-42 Feb 10, 2025
829b4b8
tweak pager navigation
mlange-42 Feb 10, 2025
fd61919
more space below logo
mlange-42 Feb 10, 2025
21a8748
improve code block style
mlange-42 Feb 10, 2025
167813a
tweak pager font
mlange-42 Feb 10, 2025
0790d11
slightly darker code blocks
mlange-42 Feb 11, 2025
a604d09
style info boxes
mlange-42 Feb 11, 2025
3226d18
add description
mlange-42 Feb 11, 2025
a206d71
add "social image"
mlange-42 Feb 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
go test -v ./docs/content/...
- name: Run benchmark tables
run: |
go run ./benchmark/table | tee docs/content/background/_benchmarks.md
go run ./benchmark/table | tee docs/content/generated/_benchmarks.md
- name: Copy changelog
run: |
cp ./CHANGELOG.md ./docs/content/background/_changelog.md
cp ./CHANGELOG.md ./docs/content/generated/_changelog.md
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

* Avoids heap allocations in generic `MapX` by using arrays for IDs (#478)

### Documentation

* Migrates the user guide to the [Hextra](https://imfing.github.io/hextra/) theme (#488)

## [[v0.15.2]](https://github.com/mlange-42/arche/compare/v0.15.1...v0.15.2)

### Performance
Expand Down
20 changes: 10 additions & 10 deletions benchmark/table/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ import (

func benchesComponents() []benchmark.Benchmark {
return []benchmark.Benchmark{
{Name: "World.Add 1 Comp", Desc: "memory already allocated", F: componentsAdd1_1000, N: 1000},
{Name: "World.Add 5 Comps", Desc: "memory already allocated", F: componentsAdd5_1000, N: 1000},
{Name: "World.Add 1 to 5 Comps", Desc: "memory already allocated", F: componentsAdd1to5_1000, N: 1000},
{Name: "World.Add 1 Comp", Desc: "memory already alloc.", F: componentsAdd1_1000, N: 1000},
{Name: "World.Add 5 Comps", Desc: "memory already alloc.", F: componentsAdd5_1000, N: 1000},
{Name: "World.Add 1 to 5 Comps", Desc: "memory already alloc.", F: componentsAdd1to5_1000, N: 1000},

{Name: "World.Remove 1 Comp", Desc: "memory already allocated", F: componentsRemove1_1000, N: 1000},
{Name: "World.Remove 5 Comps", Desc: "memory already allocated", F: componentsRemove5_1000, N: 1000},
{Name: "World.Remove 1 of 5 Comps", Desc: "memory already allocated", F: componentsRemove1of5_1000, N: 1000},
{Name: "World.Remove 1 Comp", Desc: "memory already alloc.", F: componentsRemove1_1000, N: 1000},
{Name: "World.Remove 5 Comps", Desc: "memory already alloc.", F: componentsRemove5_1000, N: 1000},
{Name: "World.Remove 1 of 5 Comps", Desc: "memory already alloc.", F: componentsRemove1of5_1000, N: 1000},

{Name: "World.Exchange 1 Comp", Desc: "memory already allocated", F: componentsExchange1_1000, N: 1000},
{Name: "World.Exchange 1 of 5 Comps", Desc: "memory already allocated", F: componentsExchange1of5_1000, N: 1000},
{Name: "World.Exchange 1 Comp", Desc: "memory already alloc.", F: componentsExchange1_1000, N: 1000},
{Name: "World.Exchange 1 of 5 Comps", Desc: "memory already alloc.", F: componentsExchange1of5_1000, N: 1000},

{Name: "Map1.Assign 1 Comps", Desc: "memory already allocated", F: componentsAssignGeneric1_1000, N: 1000},
{Name: "Map5.Assign 5 Comps", Desc: "memory already allocated", F: componentsAssignGeneric5_1000, N: 1000},
{Name: "Map1.Assign 1 Comps", Desc: "memory already alloc.", F: componentsAssignGeneric1_1000, N: 1000},
{Name: "Map5.Assign 5 Comps", Desc: "memory already alloc.", F: componentsAssignGeneric5_1000, N: 1000},
}
}

Expand Down
10 changes: 5 additions & 5 deletions benchmark/table/entities.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ func benchesEntities() []benchmark.Benchmark {
return []benchmark.Benchmark{
{Name: "Entity.IsZero", Desc: "", F: entitiesIsZero_2, N: 2},

{Name: "World.NewEntity", Desc: "memory already allocated", F: entitiesCreate_1000, N: 1000},
{Name: "World.NewEntity w/ 1 Comp", Desc: "memory already allocated", F: entitiesCreate_1Comp_1000, N: 1000},
{Name: "World.NewEntity w/ 5 Comps", Desc: "memory already allocated", F: entitiesCreate_5Comp_1000, N: 1000},
{Name: "World.NewEntity", Desc: "memory already alloc.", F: entitiesCreate_1000, N: 1000},
{Name: "World.NewEntity w/ 1 Comp", Desc: "memory already alloc.", F: entitiesCreate_1Comp_1000, N: 1000},
{Name: "World.NewEntity w/ 5 Comps", Desc: "memory already alloc.", F: entitiesCreate_5Comp_1000, N: 1000},

{Name: "World.RemoveEntity", Desc: "", F: entitiesRemove_1000, N: 1000},
{Name: "World.RemoveEntity w/ 1 Comp", Desc: "", F: entitiesRemove_1Comp_1000, N: 1000},
{Name: "World.RemoveEntity w/ 5 Comps", Desc: "", F: entitiesRemove_5Comp_1000, N: 1000},

{Name: "Map1.NewWith 1 Comp", Desc: "memory already allocated", F: entitiesCreateWithGeneric_1Comp_1000, N: 1000},
{Name: "Map5.NewWith 5 Comps", Desc: "memory already allocated", F: entitiesCreateWithGeneric_5Comp_1000, N: 1000},
{Name: "Map1.NewWith 1 Comp", Desc: "memory already alloc.", F: entitiesCreateWithGeneric_1Comp_1000, N: 1000},
{Name: "Map5.NewWith 5 Comps", Desc: "memory already alloc.", F: entitiesCreateWithGeneric_5Comp_1000, N: 1000},
}
}

Expand Down
2 changes: 2 additions & 0 deletions benchmark/table/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ func main() {
benchmark.RunBenchmarks("Components", benchesComponents(), benchmark.ToMarkdown)
benchmark.RunBenchmarks("Components, batched", benchesComponentsBatch(), benchmark.ToMarkdown)
benchmark.RunBenchmarks("Other", benchesOther(), benchmark.ToMarkdown)

fmt.Print("\n\n")
}
3 changes: 3 additions & 0 deletions benchmark/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"testing"
)

// Benchmark represents a benchmark to be run.
type Benchmark struct {
Name string
Desc string
Expand All @@ -16,6 +17,7 @@ type Benchmark struct {
Units string
}

// RunBenchmarks runs the benchmarks and prints the results.
func RunBenchmarks(title string, benches []Benchmark, format func([]Benchmark) string) {
for i := range benches {
b := &benches[i]
Expand All @@ -25,6 +27,7 @@ func RunBenchmarks(title string, benches []Benchmark, format func([]Benchmark) s
fmt.Printf("## %s\n\n%s", title, format(benches))
}

// ToMarkdown converts the benchmarks to a markdown table.
func ToMarkdown(benches []Benchmark) string {
b := strings.Builder{}

Expand Down
41 changes: 0 additions & 41 deletions docs/assets/css/cards.css

This file was deleted.

86 changes: 0 additions & 86 deletions docs/assets/css/chroma-github-dark.css

This file was deleted.

86 changes: 0 additions & 86 deletions docs/assets/css/chroma-github.css

This file was deleted.

Loading
Loading