Skip to content

Commit 00a6a0e

Browse files
authored
Merge pull request #43 from kpodemski/some-improvements
Some improvements
2 parents bdb4c01 + 9331ba9 commit 00a6a0e

4 files changed

Lines changed: 69 additions & 0 deletions

File tree

package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "devdocs-site",
3+
"version": "1.0.0",
4+
"private": true,
5+
"description": "PrestaShop Developer Documentation Site",
6+
"scripts": {
7+
"dev": "cd src && hugo server --config config.yml,config-local.yml",
8+
"build": "cd src && hugo --config config.yml,config-local.yml",
9+
"build:prod": "cd src && hugo --config config.yml"
10+
},
11+
"repository": {
12+
"type": "git",
13+
"url": "https://github.com/PrestaShop/devdocs-site.git"
14+
}
15+
}

src/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
core-symlink-*

src/config-local.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
params:
2+
enableCustomGitInfo: false
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{{- $currentPage := .Page -}}
2+
{{- $pages := .Page.Pages -}}
3+
4+
{{- /* Define categories and their display order */ -}}
5+
{{- $categories := slice
6+
"Module Management"
7+
"Translations"
8+
"Theme Management"
9+
"Development & Debugging"
10+
"Code Quality & Linting"
11+
"Database & Schema"
12+
"Search & Indexing"
13+
"Assets & Media"
14+
"API & Documentation"
15+
"Feature Flags"
16+
"Tax Management"
17+
"License & Legal"
18+
"Internal/Advanced"
19+
"Utilities"
20+
-}}
21+
22+
{{- /* Group pages by category */ -}}
23+
{{- range $categories -}}
24+
{{- $categoryName := . -}}
25+
{{- $categoryPages := where $pages ".Params.category" $categoryName -}}
26+
{{- if $categoryPages -}}
27+
<h3>{{ $categoryName }}</h3>
28+
<ul>
29+
{{- range sort $categoryPages ".Params.weight" "asc" -}}
30+
<li>
31+
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
32+
{{- with .Params.description }} - {{ . }}{{ end -}}
33+
</li>
34+
{{- end -}}
35+
</ul>
36+
{{- end -}}
37+
{{- end -}}
38+
39+
{{- /* List uncategorized commands */ -}}
40+
{{- $uncategorized := where $pages ".Params.category" nil -}}
41+
{{- if $uncategorized -}}
42+
<h3>Other Commands</h3>
43+
<ul>
44+
{{- range $uncategorized -}}
45+
<li>
46+
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
47+
{{- with .Params.description }} - {{ . }}{{ end -}}
48+
</li>
49+
{{- end -}}
50+
</ul>
51+
{{- end -}}

0 commit comments

Comments
 (0)