Skip to content

Commit

Permalink
fix: update tagline
Browse files Browse the repository at this point in the history
The current tagling is a little ambiguous and not a great
explanation of the current purpose.
  • Loading branch information
toumorokoshi committed Dec 20, 2024
1 parent 323dd40 commit 98ff9d6
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions scripts/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ function buildAEP(files: string[], folder: string): AEP {
let contents = buildMarkdown(md_text, folder);

contents.frontmatter = yaml;
contents.addComponent({'names': ['Aside', 'Tabs', 'TabItem'], 'path': '@astrojs/starlight/components'})
contents.addComponent({'names': ['Sample'], 'path': '../../components/Sample.astro'})
contents.addComponent({ 'names': ['Aside', 'Tabs', 'TabItem'], 'path': '@astrojs/starlight/components' })
contents.addComponent({ 'names': ['Sample'], 'path': '../../components/Sample.astro' })

contents.frontmatter['prev'] = false;
contents.frontmatter['next'] = false;
Expand Down Expand Up @@ -168,28 +168,28 @@ function buildLinterRule(rulePath: string, aep: string): LinterRule {

function consolidateLinterRule(linterRules: LinterRule[]): ConsolidatedLinterRule[] {
let rules = {}
for(var rule of linterRules) {
if(rule.aep in rules) {
for (var rule of linterRules) {
if (rule.aep in rules) {
rules[rule.aep].push(rule)
} else {
rules[rule.aep] = [rule];
}
}

let consolidated_rules = [];
for(var key in rules) {
for (var key in rules) {
let rules_contents = rules[key].map((aep) => `<details>
<summary>${aep.title}</summary>
${aep.contents.replace(/---[\s\S]*?---/m, '')}
</details>
`
)
let contents = `---
)
let contents = `---
title: AEP-${rules[key][0].aep} Linter Rules
---
${rules_contents.join('\n')}
`
consolidated_rules.push({'contents': contents, 'aep': rules[key][0].aep})
consolidated_rules.push({ 'contents': contents, 'aep': rules[key][0].aep })
}
return consolidated_rules;
}
Expand Down Expand Up @@ -222,7 +222,7 @@ function buildFullAEPList(aeps: AEP[]) {
function buildIndexPage(aeps: AEP[]) {
var sections = [];
let groups = readGroupFile(AEP_LOC);
for(var group of groups.categories) {
for (var group of groups.categories) {
sections.push(`# ${group.title}`)
sections.push(`<AepList label="${group.title}" />`)
}
Expand All @@ -249,7 +249,7 @@ function buildHomepage(): Markdown {
"description": "Application Enhancement Proposals",
"template": "splash",
"hero": {
"tagline": "Focused design documents for flexible API development.",
"tagline": "An API design specification and ecosystem of clients and tooling for protobuf and HTTP REST APIs.",
"image": {
"file": "../../assets/aep.svg"
},
Expand All @@ -258,7 +258,7 @@ function buildHomepage(): Markdown {
}

let config = loadConfigFiles("hero.yaml");
frontmatter.hero.actions = config.hero.buttons.map((button) => ({text: button.text, link: button.href, icon: "right-arrow"}));
frontmatter.hero.actions = config.hero.buttons.map((button) => ({ text: button.text, link: button.href, icon: "right-arrow" }));

let contents = `import config from "../../../generated/config.json";
Expand All @@ -274,7 +274,7 @@ function buildHomepage(): Markdown {

let sidebar: Sidebar = [];

if(AEP_LOC != "") {
if (AEP_LOC != "") {
// Build config.
let config = loadConfigFiles("hero.yaml", "urls.yaml", "site.yaml");
writeSidebar(config, "config.json");
Expand Down Expand Up @@ -321,7 +321,7 @@ if (AEP_LINTER_LOC != "") {
}

sidebar = buildLinterSidebar(consolidated_rules, sidebar)
sidebar = addToSidebar(sidebar, "Tooling", [{label: "Website", link: "tooling/website"}]);
sidebar = addToSidebar(sidebar, "Tooling", [{ label: "Website", link: "tooling/website" }]);
} else {
console.warn("Proto linter repo is not found.")
}
Expand Down

0 comments on commit 98ff9d6

Please sign in to comment.