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

Concat Upsun config files from template-builder fork to llms-full.txt #4355

Open
wants to merge 74 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
6cfc1ce
adding output as markdown for all RegularPages
flovntp Nov 20, 2024
2fde430
first try for the llms.txt file
flovntp Nov 21, 2024
337e867
pandoc debug
flovntp Nov 21, 2024
b3510f3
install pandoc from Github
flovntp Nov 21, 2024
78f5db4
debug install Pandoc
flovntp Nov 21, 2024
291dca5
debug install Pandoc
flovntp Nov 21, 2024
6a3e40a
debug install Pandoc
flovntp Nov 21, 2024
efb7bc2
debug install Pandoc
flovntp Nov 21, 2024
a51fb82
debug pandoc install
flovntp Nov 21, 2024
c59ba0e
debug pandoc install
flovntp Nov 21, 2024
a6583d6
debug pandoc install
flovntp Nov 21, 2024
1b03cd5
debug pandoc install
flovntp Nov 21, 2024
5b19279
debug pandoc install
flovntp Nov 21, 2024
3325409
debug pandoc install
flovntp Nov 21, 2024
8c5a848
debug pandoc install
flovntp Nov 21, 2024
6a7f69a
debug pandoc install
flovntp Nov 21, 2024
2e62340
debug pandoc install
flovntp Nov 21, 2024
af5c781
debug pandoc install
flovntp Nov 21, 2024
76ddbe8
debug pandoc install
flovntp Nov 21, 2024
bcbad70
debug pandoc install
flovntp Nov 21, 2024
0bde260
debug pandoc install
flovntp Nov 21, 2024
bf1df92
debug pandoc install
flovntp Nov 21, 2024
5db3e84
debug pandoc install
flovntp Nov 21, 2024
d3fc1c9
debug pandoc install
flovntp Nov 21, 2024
c958c81
ABOUT.md updates
flovntp Nov 26, 2024
1272e14
merge main
flovntp Dec 11, 2024
f2fb1ca
adding HTML sanitization before pandoc
flovntp Dec 11, 2024
d284734
no build:assets for platform site
flovntp Dec 11, 2024
c0b3643
using releases endpoint instead of tags to get latest ASSET
flovntp Dec 11, 2024
5510fe0
remove fixed version
flovntp Dec 11, 2024
441ce10
usign tag_name instead of name
flovntp Dec 11, 2024
0b914dd
remove build:assets for upsun (main)
flovntp Dec 11, 2024
b9cc524
build llms.txt on the same destination file
flovntp Dec 11, 2024
24f60ea
adding heap memory limit to pandoc
flovntp Dec 11, 2024
c47d337
no need of pandoc, all transformation in home.llms.txt
flovntp Dec 13, 2024
b2a3e28
llms transform h3
flovntp Dec 13, 2024
4019ed1
upgrade hugo to 0.139.4
flovntp Dec 13, 2024
8132e50
manage HTML table
flovntp Jan 3, 2025
8d6b27e
Merge branch 'main' into fhk-llms-txt
flovntp Jan 3, 2025
b4f6226
sample for Symfony config.yaml (skeleton, postgresql, postgresql+rabb…
flovntp Jan 6, 2025
c18729a
typo in the Rabbitmq doc page
flovntp Jan 6, 2025
67d249e
adding Symfony config samples
flovntp Jan 6, 2025
c61f7b4
split llms.txt and llms-full.txt
flovntp Jan 7, 2025
2f889cb
Merge branch 'main' into fhk-llms-txt
flovntp Jan 7, 2025
0149e2f
useless script
flovntp Jan 8, 2025
7708382
useless file
flovntp Jan 8, 2025
c38b5ff
useless file
flovntp Jan 8, 2025
4f32e2b
llms.txt: all links at the same level
flovntp Jan 9, 2025
971c291
remove spacings
flovntp Jan 10, 2025
81bfd9c
Merge branch 'main' into fhk-llms-txt
flovntp Jan 20, 2025
3c1b09e
Merge branch 'main' into fhk-llms-txt
flovntp Jan 23, 2025
bcb851b
adding llms app to compute llms.txt
flovntp Jan 23, 2025
a10b1dc
adding llms.go
flovntp Jan 29, 2025
5a7a913
shell script to concat all config examples from template builder
flovntp Jan 29, 2025
a49f25f
move llms script in sites/upsun folder
flovntp Jan 29, 2025
75c972a
debug exec script
flovntp Jan 29, 2025
f06decc
let llms shell script being executed
flovntp Jan 29, 2025
b9a5255
use existing GITHUB_API_TOKEN
flovntp Jan 29, 2025
78a43f9
wrong syntax
flovntp Jan 29, 2025
8295ef0
debug
flovntp Jan 29, 2025
59b32de
debug
flovntp Jan 29, 2025
30a9c43
debug
flovntp Jan 29, 2025
8ccda58
base64 decode on the GH content
flovntp Jan 29, 2025
52e1f1c
base64 decode on the GH content
flovntp Jan 29, 2025
cb2b7e6
base64 decode on the GH content
flovntp Jan 29, 2025
687eefb
base64 decode on the GH content
flovntp Jan 29, 2025
7142175
base64 decode on the GH content
flovntp Jan 29, 2025
2cc20be
base64 decode on the GH content
flovntp Jan 30, 2025
afe264b
new try to write in llms-full.txt
flovntp Jan 30, 2025
89efa32
new try to write in llms-full.txt
flovntp Jan 30, 2025
906d17e
new try to write in llms-full.txt
flovntp Jan 30, 2025
5498ef9
new try to write in llms-full.txt
flovntp Jan 30, 2025
1958990
clean code
flovntp Jan 30, 2025
2fe0534
Merge branch 'main' into fhk-llms-txt
flovntp Jan 30, 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
1 change: 1 addition & 0 deletions .platform/applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
npm install
npm run build
./build_docs.sh
./llms-get-gh-config-examples.sh
deploy: |
cd $SITE_DIR
./deploy.sh
Expand Down
50 changes: 50 additions & 0 deletions sites/upsun/llms-get-gh-config-examples.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash

GH_API_KEY="${GITHUB_API_TOKEN}" # Assurez-vous que la variable est exportée dans l'environnement

data_dir="./public"
config_file_path="$data_dir/llms-full.txt"
repo_owner="Theosakamg-PSH"
repo_name="template-builder"
templates_path="templates"

echo "Fetching templates from repository..."
mkdir -p "$data_dir"

# Récupérer la liste des templates
response=$(curl -s -H "Authorization: token $GH_API_KEY" \
"https://api.github.com/repos/$repo_owner/$repo_name/contents/$templates_path")

template_dirs=$(echo "$response" | jq -r '.[] | select(.type == "dir") | .name')

for template_name in $template_dirs; do
echo "Processing template: $template_name"

upsun_config_path="$templates_path/$template_name/files/.upsun"

upsun_response=$(curl -s -H "Authorization: token $GH_API_KEY" -H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/$repo_owner/$repo_name/contents/$upsun_config_path")

if echo "$upsun_response" | jq -e 'if type=="array" then . else empty end' > /dev/null; then
config_files=$(echo "$upsun_response" | jq -r '.[] | select(.type == "file") | .download_url')

for config_url in $config_files; do
echo "Downloading config from: $config_url"
# Fetch the file content from GitHub API
config_data=$(curl -s -H "Authorization: token $GH_API_KEY" -H 'Accept: application/vnd.github.v3.raw' "$config_url")

echo -e "\n## Example of a ${template_name} config\n" >> "$config_file_path"
echo -e "This is an example of a config.yaml file to host a \`$template_name\` stack on Upsun.\n" >> "$config_file_path"
echo -e "\`\`\`yaml {location=\"config.yaml\"}" >> "$config_file_path"
echo -e "$config_data" >> "$config_file_path"
echo -e "\`\`\`\n" >> "$config_file_path"
done
else
echo "No .upsun folder for $template_name"
#echo "$upsun_response" # Affiche la réponse brute pour le diagnostic
continue
fi

done

echo "Processing complete. Output saved to $config_file_path"
Loading