Skip to content

Commit

Permalink
bring in docs for test
Browse files Browse the repository at this point in the history
  • Loading branch information
CameronBrooks11 committed Jan 14, 2025
1 parent b5897a2 commit 6786a89
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 5 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/open-source-agriculture-logopng.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 2 additions & 5 deletions projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,5 @@ permalink: /projects/

At the Free Appropriate Sustainability Technology (FAST) Research Group, we are involved in a variety of exciting projects that focus on sustainable technology and open-source hardware.

## Ongoing Projects

[OpenAgriS3D](/projects/openagris3d/)

[SAMA](/projects/sama/)
- [OpenAgriS3D](/projects/openagris3d/)
- [SAMA](/projects/sama/)
30 changes: 30 additions & 0 deletions sync_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

# Ensure the submodules are updated
git submodule update --remote --merge

# Loop through each project in the _projects folder
for project in _projects/*; do
if [ -d "$project/docs" ]; then
# Copy assets folder (if it exists)
if [ -d "$project/assets" ]; then
cp -r "$project/assets"/* assets/
fi

# Process each markdown file in docs
find "$project/docs" -name "*.md" | while read -r file; do
# Extract relative path from the docs folder and generate a URL-friendly title
relative_path=${file#"$project/docs/"}
filename=$(basename "$relative_path" .md)
title=$(echo "$filename" | sed -e 's/-/ /g' -e 's/\b\(.\)/\u\1/g')

# Check if front matter exists
if ! grep -q "^---" "$file"; then
# Add front matter with a proper permalink and title
echo -e "---\nlayout: project-docs\ntitle: \"$title\"\npermalink: /projects/$(basename "$project")/docs/${relative_path%.md}/\n---\n$(cat "$file")" > "$file"
fi
done
fi
done

echo "Documentation and assets synced, front matter added."

0 comments on commit 6786a89

Please sign in to comment.