Skip to content

Commit 245eaf8

Browse files
authored
Merge prebuild-summary into develop (#118)
* Added prebuild.sh to vercel_build and updated Summaries. * Updating prebuild to work in vercel for dynamic summaries. * Updating wordlist as well for summaries * Updating wordlist * Updating prebuild config.
1 parent d620581 commit 245eaf8

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

prebuild.sh

+26-5
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,38 @@ set -e
55

66
echo "Running prebuild SUMMARY.md selection..."
77

8-
# Get the current git branch
9-
CURRENT_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
8+
# Default branch
9+
CURRENT_BRANCH="unknown"
1010

11-
# If branch detection fails, try CI environment variables
12-
if [ "$CURRENT_BRANCH" = "unknown" ]; then
11+
# Check for Vercel environment variables first
12+
if [ -n "$VERCEL_GIT_COMMIT_REF" ]; then
13+
CURRENT_BRANCH=$VERCEL_GIT_COMMIT_REF
14+
echo "Branch detected from VERCEL_GIT_COMMIT_REF: $CURRENT_BRANCH"
15+
# Get the current git branch (fallback)
16+
elif git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
17+
CURRENT_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
18+
echo "Branch detected from git: $CURRENT_BRANCH"
19+
# Try other CI environment variables
20+
else
1321
# Try GitHub Actions env var
1422
if [ -n "$GITHUB_REF" ]; then
1523
CURRENT_BRANCH=${GITHUB_REF#refs/heads/}
24+
echo "Branch detected from GITHUB_REF: $CURRENT_BRANCH"
1625
# Try GitLab CI env var
1726
elif [ -n "$CI_COMMIT_BRANCH" ]; then
1827
CURRENT_BRANCH=$CI_COMMIT_BRANCH
28+
echo "Branch detected from CI_COMMIT_BRANCH: $CURRENT_BRANCH"
29+
# Try general CI environment variables
30+
elif [ -n "$BRANCH_NAME" ]; then
31+
CURRENT_BRANCH=$BRANCH_NAME
32+
echo "Branch detected from BRANCH_NAME: $CURRENT_BRANCH"
33+
else
34+
echo "Could not detect branch from any source, defaulting to 'develop'"
35+
CURRENT_BRANCH="develop"
1936
fi
2037
fi
2138

22-
echo "Detected branch: $CURRENT_BRANCH"
39+
echo "Final detected branch: $CURRENT_BRANCH"
2340

2441
# Ensure the config directory exists
2542
if [ ! -d "src/config" ]; then
@@ -39,6 +56,10 @@ if [ ! -f "src/config/SUMMARY.md.main" ]; then
3956
exit 1
4057
fi
4158

59+
# Add debug information about available environment variables
60+
echo "Available environment variables:"
61+
env | sort | grep -E 'GIT|VERCEL|BRANCH|CI' || echo "No relevant environment variables found"
62+
4263
# Select the appropriate SUMMARY.md based on branch
4364
if [ "$CURRENT_BRANCH" = "main" ] || [ "$CURRENT_BRANCH" = "master" ]; then
4465
echo "Using main branch SUMMARY.md"

src/community-management/twitter.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Using a unique password for Twitter is crucial. If you haven't set one, now is t
8585
## Best Practices & Additional Tips
8686

8787
- **Disable Email and Phone Discoverability**
88-
- **Go to** [Discoverability and Contacts](https://x.com/settings/contacts)
88+
- **Go to:** [Discoverability and Contacts](https://x.com/settings/contacts)
8989
- It is recommended to turn both email and phone discoverability off.
9090

9191
- **Privacy & Safety Settings:**

0 commit comments

Comments
 (0)