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

[ENCHANCEMENT] Clean DAC navbar + uppercase first char in title #24

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: synchronize
synchronize:
@sh ./scripts/synchronize.sh
@bash ./scripts/synchronize.sh

.PHONY: website-install-depenencies
website-install-depenencies:
Expand Down
24 changes: 21 additions & 3 deletions scripts/synchronize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ mkdir -p $BASE_OUTPUT_DIR/perses

## Creating perses _index.md file for perses root folder
echo "---
title: perses
title: Perses
---" > "$BASE_OUTPUT_DIR/perses/_index.md"

# ## Copy the prologue section from the main branch
cp -R "$OUTPUT_CONTENT_DIR/prologue" $BASE_OUTPUT_DIR

## Creating prologue _index.md file for prologue root folder
echo "---
title: prologue
title: Prologue
---" > "$BASE_OUTPUT_DIR/prologue/_index.md"

# ## Copy images from the main branch
Expand Down Expand Up @@ -133,9 +133,27 @@ for folder in $sorted_folders; do
if [ "$folder" != $release_tag ]; then
WEIGHT_VALUE=$((WEIGHT_VALUE + 1))
echo "---
title: ${folder}
title: ${folder^}
weight: ${WEIGHT_VALUE}
---" > $OUTPUT_CONTENT_DIR/$folder/_index.md

# Do the same for children folders
sorted_children_folders=$(find $OUTPUT_CONTENT_DIR/$folder/ -maxdepth 1 -type d -exec basename {} \; | sort)
CHILDREN_WEIGHT_VALUE=0

for children_folder in $sorted_children_folders; do

## TODO: handle unlimited depth of children folders
# Add _index.md file for the children folder
if [ "$children_folder" != $folder ]; then
CHILDREN_WEIGHT_VALUE=$((CHILDREN_WEIGHT_VALUE + 1))
echo "---
title: ${children_folder^}
weight: ${CHILDREN_WEIGHT_VALUE}
---" > $OUTPUT_CONTENT_DIR/$folder/$children_folder/_index.md
fi
done

fi
done

Expand Down
4 changes: 2 additions & 2 deletions website/config/_default/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ defaultContentLanguage = "en"
disableLanguages = ["de", "nl"]
defaultContentLanguageInSubdir = false

copyRight = "Copyright (c) 2023 Perses"
copyRight = "Copyright (c) 2024 Perses"

[build.buildStats]
enable = true

[social]
twitter = ""
twitter = "https://twitter.com/PersesDev"

[outputs]
home = ["HTML", "RSS", "searchIndex"]
Expand Down
Loading