Skip to content
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
13 changes: 13 additions & 0 deletions .github/upload-staging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ aws cloudfront create-invalidation --distribution-id EQE4NPRH0CQXJ --paths "/*"

if [ -d "packages/site/dist" ]; then
aws s3 rm --recursive s3://patternfly-org-preview
aws s3 sync packages/site/dist s3://patternfly-org-preview --exclude "*" \
--include "*.html" \
--include "*.json" \
--exclude "static/**/*.json" \
--include "sw.js" \
--cache-control "public, max-age=0, must-revalidate"

aws s3 sync packages/site/dist s3://patternfly-org-preview --include "*" \
--exclude "*.html" \
--exclude "*.json" \
--include "static/**/*.json" \
--exclude "sw.js" \
--cache-control "public, max-age=31536000, immutable"

aws cloudfront create-invalidation --distribution-id E2IXSH9IWFQCUC --paths "/*"
fi
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public
static
.cache
/build
packages/site/src/generated
dist

# IDE - VSCode
.vscode
Expand Down
4 changes: 3 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
"packages": [
"packages/ast-helpers",
"packages/documentation-framework",
"packages/documentation-site"
"packages/documentation-site",
"packages/site"
],
"version": "independent",
"allowBranch": ["main", "v4", "v5"]
}
git
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
"scripts": {
"analyze": "yarn workspace patternfly-org analyze",
"develop": "yarn workspace patternfly-org develop",
"dev": "yarn workspace site dev",
"develop:extensions": "EXTENSIONS_ONLY=true PRERELEASE=true yarn develop",
"build:analyze": "yarn workspace patternfly-org build:analyze && yarn copy",
"build": "yarn workspace patternfly-org build && yarn copy",
"build": "yarn workspace patternfly-org build && yarn workspace site build && yarn copy",
"build:extensions": "EXTENSIONS_ONLY=true PRERELEASE=true yarn build",
"copy": "rm -rf build/patternfly-org/site && mkdir -p build/patternfly-org && cp -r packages/documentation-site/public build/patternfly-org/site",
"clean": "lerna run clean && rm -rf build",
Expand Down

This file was deleted.

1 change: 1 addition & 0 deletions packages/site/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Patternfly site built with doc core
21 changes: 21 additions & 0 deletions packages/site/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "site",
"type": "module",
"version": "0.0.1",
"scripts": {
"clean": "rm -rf src/generated",
"generate:content": "patternfly-doc-core convert-to-mdx ../documentation-site/patternfly-docs/content/",
"dev": "patternfly-doc-core start",
"build": "patternfly-doc-core build",
"serve": "patternfly-doc-core serve",
"sync": "patternfly-doc-core sync",
"init:docs": "patternfly-doc-core init"
},
"dependencies": {
"@patternfly/patternfly-doc-core": "^1.9.0",
"astro": "^5.7.13"
},
"devDependencies": {
"tsx": "^4.19.0"
}
}
32 changes: 32 additions & 0 deletions packages/site/pf-docs.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
export const config = {
content: [
// example content entry for local content, this would feed all markdown files in the content directory to the
// documentation core with a content identifier of 'content':
{
base: 'src/',
pattern: "**/*.{md,mdx}",
name: 'content'
},
//
// example content entry for remote content, this would fetch all markdown files matching the glob in 'pattern'
// from the specified npm package and serve them with a content identifier of 'react-component-docs':
// {
// packageName: "@patternfly/react-core",
// pattern: "**/components/**/*.md",
// name: "react-component-docs",
// },
],
navSectionOrder: [],
outputDir: './dist',
propsGlobs: [
// {
// include: ['*/@patternfly/react-core/src/**/*.tsx'],
// exclude: [
// '/**/examples/**',
// '/**/__mocks__/**',
// '/**/__tests__/**',
// '/**/*.test.tsx',
// ],
// },
],
}
15 changes: 15 additions & 0 deletions packages/site/rename-md-to-mdx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# Find all .md files in the src directory and its subdirectories
find src -name "*.md" | while read -r file; do
# Create the new filename by replacing .md with .mdx
new_file="${file%.md}.mdx"

# Only rename if the file exists and hasn't been renamed already
if [ -f "$file" ] && [ ! -f "$new_file" ]; then
echo "Renaming: $file -> $new_file"
mv "$file" "$new_file"
fi
done

echo "Renaming complete!"
Loading