diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2eaf038..1f41a59 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,10 +3,22 @@ { "name": "AtlassianPS Dev Environment - Jekyll", "image": "mcr.microsoft.com/devcontainers/ruby:3.3-bookworm", + "forwardPorts": [ + 4000, + 35729 + ], + "portsAttributes": { + "4000": { + "label": "Jekyll site" + }, + "35729": { + "label": "LiveReload" + } + }, "features": { "ghcr.io/devcontainers-contrib/features/zsh-plugins:0": {} }, - "postCreateCommand": ".devcontainer/post-create.sh", + "postCreateCommand": "bash .devcontainer/post-create.sh", "customizations": { "vscode": { "settings": {} diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh index 8fb2707..e3b5af0 100755 --- a/.devcontainer/post-create.sh +++ b/.devcontainer/post-create.sh @@ -1,16 +1,22 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash +set -euo pipefail -# Use Ruby 3.3 for Jekyll +repo_root="$(cd "$(dirname "$0")/.." && pwd)" +cd "$repo_root" -# Install the version of Bundler specified in the Gemfile.lock -if [ -f Gemfile.lock ] && grep "BUNDLED WITH" Gemfile.lock > /dev/null; then - cat Gemfile.lock | tail -n 2 | grep -C2 "BUNDLED WITH" | tail -n 1 | xargs gem install bundler -v +echo "Preparing Jekyll devcontainer dependencies..." + +# Install the Bundler version pinned in Gemfile.lock when present. +if [[ -f Gemfile.lock ]]; then + bundler_version="$(awk '/^BUNDLED WITH$/ { getline; gsub(/^[[:space:]]+/, "", $0); print $0; exit }' Gemfile.lock)" + if [[ -n "${bundler_version:-}" ]]; then + gem install bundler -v "$bundler_version" + fi fi -# If there's a Gemfile, then run `bundle install` -# It's assumed that the Gemfile will install jekyll too -if [ -f Gemfile ]; then +if [[ -f Gemfile ]]; then bundle install fi -bundle exec jekyll serve --force-polling +echo "Devcontainer is ready." +echo "Run: bundle exec jekyll serve --host 0.0.0.0 --livereload --force-polling" diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index b75ce8f..3fab79a 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -5,6 +5,8 @@ on: branches: [master] pull_request: branches: [master] + schedule: + - cron: "17 4 * * *" workflow_dispatch: permissions: @@ -34,6 +36,86 @@ jobs: - name: Setup Pages uses: actions/configure-pages@v5 + - name: Generate contributors data + uses: actions/github-script@v7 + with: + script: | + const fs = require('fs'); + const path = require('path'); + const owner = 'AtlassianPS'; + + const payload = { + generated_at: new Date().toISOString(), + org: owner, + repos_count: 0, + repos: [], + contributors: [], + error: null + }; + + try { + const repos = await github.paginate(github.rest.repos.listForOrg, { + org: owner, + type: 'public', + per_page: 100 + }); + + const activeRepos = repos.filter((repo) => !repo.fork && !repo.archived); + const contributorMap = new Map(); + + for (const repo of activeRepos) { + core.info(`Collecting contributors for ${repo.name}`); + const contributors = await github.paginate(github.rest.repos.listContributors, { + owner, + repo: repo.name, + per_page: 100 + }); + + for (const contributor of contributors) { + if (!contributor.login || contributor.login.endsWith('[bot]')) { + continue; + } + + const existing = contributorMap.get(contributor.login) || { + login: contributor.login, + html_url: contributor.html_url, + avatar_url: contributor.avatar_url, + contributions: 0, + repositories: [] + }; + + existing.contributions += contributor.contributions || 0; + if (!existing.repositories.includes(repo.name)) { + existing.repositories.push(repo.name); + } + + contributorMap.set(contributor.login, existing); + } + } + + payload.repos = activeRepos.map((repo) => repo.name).sort((a, b) => a.localeCompare(b)); + payload.repos_count = payload.repos.length; + payload.contributors = Array.from(contributorMap.values()) + .map((contributor) => ({ + ...contributor, + repositories: contributor.repositories.sort((a, b) => a.localeCompare(b)), + repos_count: contributor.repositories.length + })) + .sort((a, b) => + b.contributions - a.contributions || + b.repos_count - a.repos_count || + a.login.localeCompare(b.login) + ); + } catch (error) { + payload.error = error.message; + core.warning(`Failed to collect contributors: ${error.message}`); + } + + const outputPath = path.join(process.env.GITHUB_WORKSPACE, '_data', 'contributors', 'generated.json'); + fs.mkdirSync(path.dirname(outputPath), { recursive: true }); + fs.writeFileSync(outputPath, `${JSON.stringify(payload, null, 2)}\n`); + core.info(`Wrote contributors data to ${outputPath}`); + - name: Build Jekyll run: bundle exec jekyll build --baseurl "" env: diff --git a/_config.yml b/_config.yml index 1fc8f65..e4a8ab3 100644 --- a/_config.yml +++ b/_config.yml @@ -3,8 +3,18 @@ title: AtlassianPS description: A PowerShell community for Atlassian products # description: A community for PowerShell lovers that use Atlassian products keywords: Atlassian,AtlassianPS,jira,confluence,bitbucket,hipchat,jiraps,confluenceps,bitbucketps,hipchatps,github,gh-pages +lang: en-US baseurl: "" url: "https://atlassianps.org" +logo: /assets/img/AtlassianPS.png + +author: + name: AtlassianPS + +social: + name: AtlassianPS + links: + - https://github.com/AtlassianPS # exclude: ["modules"] diff --git a/_data/landing.yml b/_data/landing.yml index 768e4ca..3d6d357 100644 --- a/_data/landing.yml +++ b/_data/landing.yml @@ -1,25 +1,41 @@ # index page sections # custom following lines to edit your index page +- id: quickstart + name: Quick Start + tpl: quickstart.html + preTitle: Pick a module and run + title: One Powerful Command + postTitle: + classes: quickstart-section + - id: modules name: Modules tpl: modules.html - preTitle: These are our - title: Modules + preTitle: Build automation with + title: AtlassianPS Modules postTitle: - classes: + classes: modules-section + +- id: workflows + name: Workflows + tpl: workflows.html + preTitle: Common automation + title: Workflow Recipes + postTitle: Ready-to-adapt examples from the gallery + classes: workflows-section - id: people name: People tpl: people.html - preTitle: - title: People - postTitle: Who built this - classes: + preTitle: Open source by + title: Community + postTitle: Maintainers, reviewers, and contributors + classes: people-section - id: posts name: Posts tpl: posts.html preTitle: Latest - title: Posts + title: Updates postTitle: - classes: + classes: updates-section diff --git a/_includes/analytics.html b/_includes/analytics.html new file mode 100644 index 0000000..cef5817 --- /dev/null +++ b/_includes/analytics.html @@ -0,0 +1,8 @@ + + + diff --git a/_includes/carousel.html b/_includes/carousel.html index 5f1860a..3813fef 100644 --- a/_includes/carousel.html +++ b/_includes/carousel.html @@ -1,21 +1,16 @@ - -
-
-
-

We PowerShell

-
PS> Import-Module Confluence|JiraPS
-

Welcome to a community of Powershell lovers, who are invested in making Atlassian product part of their Powershell life

- Who We Are - Get Started -
+
+
+

Automation toolkit for Jira, Confluence, and shared config

+

Automate Jira and Confluence work with confidence

+

+ Use production-ready modules, practical workflows, and clear documentation across the + AtlassianPS ecosystem. +

+ + +
diff --git a/_includes/footer.html b/_includes/footer.html index ef688a3..4927726 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -2,11 +2,11 @@
- +
- Copyright © 2017 AtlassianPS + Copyright © 2017-{{ "now" | date: "%Y" }} AtlassianPS
diff --git a/_includes/head-favicons.html b/_includes/head-favicons.html new file mode 100644 index 0000000..988fb98 --- /dev/null +++ b/_includes/head-favicons.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/_includes/head-meta.html b/_includes/head-meta.html new file mode 100644 index 0000000..3b2e853 --- /dev/null +++ b/_includes/head-meta.html @@ -0,0 +1,14 @@ + + + + +{% assign pageTitle = include.title | default: page.title | default: site.title %} +{% if pageTitle == site.title %} +{{ site.title }} +{% else %} +{{ pageTitle }} | {{ site.title }} +{% endif %} +{% seo title=false %} +{% if site.keywords %} + +{% endif %} diff --git a/_includes/head-scripts-core.html b/_includes/head-scripts-core.html new file mode 100644 index 0000000..acc3ef8 --- /dev/null +++ b/_includes/head-scripts-core.html @@ -0,0 +1,7 @@ + + + + + + + diff --git a/_includes/navigation.html b/_includes/navigation.html index 3133672..9d57f76 100644 --- a/_includes/navigation.html +++ b/_includes/navigation.html @@ -14,9 +14,9 @@

Menu +