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
4 changes: 2 additions & 2 deletions _scripts/contributors/contributors.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { genTeamMarkdownSegment } from "./team.mjs";
// Parse CLI input
const program = new Command();
program.name("node .")
.description("Script to generate https://keyman.com/about/team/index.md")
.description("Script to generate https://keyman.com/_content/about/team/index.md")
.version("0.1.0")
.option("-o, --output <filename>", "output file", "index.md")
.option("-g, --github-key <key>", "github api authentication key (https://github.com/settings/tokens)")
Expand All @@ -26,7 +26,7 @@ program.parse(process.argv);

async function main() {

const teamData = JSON.parse(fs.readFileSync('../../about/team/team.json', 'utf-8'));
const teamData = JSON.parse(fs.readFileSync('../../_content/about/team/team.json', 'utf-8'));
const coreTeam = teamData.filter(member => member.level == 'core');
const formerTeam = teamData.filter(member => member.level == 'core-previous');
const coreTeamHandles = coreTeam.map(member => member.handle);
Expand Down
6 changes: 3 additions & 3 deletions _scripts/contributors/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ if [[ -z "${GITHUB_TOKEN+x}" ]] || [[ -z "${CROWDIN_TOKEN+x}" ]]; then
fi

npm ci
node . -g "${GITHUB_TOKEN}" -c "${CROWDIN_TOKEN}" -o "../../about/team/index.md" "$@"
node . -g "${GITHUB_TOKEN}" -c "${CROWDIN_TOKEN}" -o "../../_content/about/team/index.md" "$@"

if [[ -z "${GITHUB_ACTIONS+x}" ]]; then
echo "Skipping git commit because of local run"
else
if ! git diff --exit-code -- ../../about/team/index.md; then
if ! git diff --exit-code -- ../../_content/about/team/index.md; then
git config user.email server@keyman.com
git config user.name "Keyman Server"
git switch -c auto/contributors
git add ../../about/team/index.md
git add ../../_content/about/team/index.md
git commit -m "auto: refresh contributors

Test-bot: skip"
Expand Down
2 changes: 1 addition & 1 deletion _scripts/contributors/team.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function genTeamMarkdownSegment(teamData) {

for(const member of teamData) {
const img = member.img ? `/cdn/dev/img/${member.img}` : `https://github.com/${member.handle}.png?size=240`;
const url = fs.existsSync(`../../about/team/bios/${member.handle}.md`) ? `bios/${member.handle}` : `https://github.com/${member.handle}`;
const url = fs.existsSync(`../../_content/about/team/bios/${member.handle}.md`) ? `bios/${member.handle}` : `https://github.com/${member.handle}`;
md += `
<div markdown="1">

Expand Down
Loading