Skip to content

Commit

Permalink
Migrated Pages knowledge base content and functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesthebrooks committed Oct 17, 2024
1 parent 40c23e7 commit 39d9914
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ module.exports = function (config) {
return page.url.replace("/pages/knowledge-base/articles", "/knowledge-base");
}
if (page.url.startsWith("/content/pages/knowledge-base/articles")) {
return page.url.replace("/content/pages/knowledge-base/articles", "/content/knowledge-base");
return page.url.replace("/content/pages/knowledge-base/articles", "/pages/knowledge-base");
}
if (page.url.startsWith("/content/news/articles/")) {
let dateMatches = page.url.match(/[0-9]{4}-[0-9]{2}-[0-9]{2}/g);
Expand Down
18 changes: 18 additions & 0 deletions _data/assetPaths.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
{
"2017-benchmarking-us-government.pdf": "/assets/documents/2017-benchmarking-us-government-websites.pdf",
"AFWERX-case.pdf": "/assets/documents/AFWERX-case-study.pdf",
"Federalist-ATO-Extension.pdf": "/assets/documents/Federalist-ATO-Extension-Letter.pdf",
"Federalist-One.pdf": "/assets/documents/Federalist-One-Pager.pdf",
"Office_Hours_EC_ES_Tech_Talk.pdf": "/assets/documents/Office_Hours_EC_ES_Tech_Talk.pdf",
"Pages.pdf": "/assets/documents/Pages-Proposal.pdf",
"afwerx.pdf": "/assets/documents/afwerx-success.pdf",
"cloud-gov-benefits-of-enterprise.pdf": "/assets/documents/cloud-gov-benefits-of-enterprise-solution.pdf",
"coe.pdf": "/assets/documents/coe-success.pdf",
"doi.pdf": "/assets/documents/doi-success.pdf",
"example-diagram.pdf": "/assets/documents/example-diagram-2.pdf",
"federalist-system.pdf": "/assets/documents/federalist-system-architecture.pdf",
"how-federalist-works-for.pdf": "/assets/documents/how-federalist-works-for-presentation.pdf",
"how-pages-works.pdf": "/assets/documents/how-pages-works-diagram.pdf",
"pages-compliance.pdf": "/assets/documents/pages-compliance-memo.pdf",
"admin.js": "/assets/js/admin-OYJBR6FH.js",
"admin.map": "/assets/js/admin-OYJBR6FH.js.map",
"anchor.min.js": "/assets/js/anchor.min.js",
"app.js": "/assets/js/app-L3434OIE.js",
"app.map": "/assets/js/app-L3434OIE.js.map",
"uswds.js": "/assets/js/uswds-init.js",
"prism-atom.css": "/assets/styles/prism-atom-dark.css",
"styles.css": "/assets/styles/styles-QGJC3V2K.css",
"styles.map": "/assets/styles/styles-QGJC3V2K.css.map"
}
2 changes: 1 addition & 1 deletion _data/collections.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

- label: cloud.gov knowledge base
name: kbarticles
folder: content/knowledge-base/articles/
folder: pages/knowledge-base/articles/
create: true
slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
editor:
Expand Down
2 changes: 1 addition & 1 deletion content/pages/contact.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
permalink: /pages/contact/
layout: layouts/page
navigation: pages

title: cloud.gov Pages - Contact
hidetitle: true
---
Expand Down
2 changes: 1 addition & 1 deletion content/pages/features.liquid
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
permalink: /pages/features/
layout: layouts/page
navigation: pages

title: cloud.gov Pages - Features
hidetitle: true
---
Expand Down
2 changes: 1 addition & 1 deletion content/pages/federalist-migration.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
permalink: /pages/federalist-migration/
layout: layouts/page
navigation: pages

title: cloud.gov Pages - Federalist Migration
---

Expand Down
2 changes: 1 addition & 1 deletion content/pages/index.liquid
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
permalink: /pages/
layout: layouts/wide
navigation: pages

title: cloud.gov Pages
redirect_from:
- /content/federalist-migration/
Expand Down
6 changes: 6 additions & 0 deletions content/pages/knowledge-base/articles/articles.11tydata.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
permalink: function (data) {
const fileName = data.page.inputPath.replace('content/', '').replace('articles/', '').split('.').slice(0, -1).join('.');
return `/${fileName}/`;
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ For a complete list of configuration options and implementations, visit the GitH

This example `dependabot.yml` file is for any Jekyll site running on Pages. In this case there are two defined package ecosystems which are npm and bundler, both located in the root directory. Specifically for the npm package we’ve set the conditions for Dependabot to check for dependency updates once a week, on Monday, while specifying the time and timezone. By default, Dependabot is set to the UTC timezone. We’ve added and set the condition `open-pull-requests-limit` to the value 2 so no matter how many updates there are, Dependabot will only open 2 pull requests a week maximum which will drastically cut down on noise. By default, Dependabot opens a maximum of five pull requests for version updates. We have also set an `ignore` condition for the dependency `minimatch` which will ignore all updates through version 3, effectively pinning it at its current version for the time being. For the bundler package manager we have kept the same conditions as with npm except we have set the frequency interval to monthly which by default will be the first Monday of the month. Although this is in the same yaml file, conditions set for each package-ecosystem are independent of each other. We have also specified a bundler dependency version to ignore.

```
```shell
version: 2
updates:
- package-ecosystem: "npm"
Expand Down Expand Up @@ -78,7 +78,7 @@ ignore:
In this example an 11ty site is used and we have specfified our npm package manager once again. We have set dependabot to check for version updates daily by specifying "daily" as the interval. We have set the branch that dependabot will run checks against as our `staging` branch by utilizing the "target-branch" option. By default, Dependabot will check for manifest files on the production branch and raise pull requests for version updates against it. You can override this behavior by explicitly setting the `target-branch` condition to another branch and have pull requests opened against it instead of your main branch which is what we have done here. It may be easier for Pages users to run more frequent version checks against a staging type branch as opposed to the main branch to make pull requests and alerts more manageable. We have also set Dependabot to ignore all version updates for 3.0 on the dependency `rimraf` with a pull request limit of 2.

```
```shell
version: 2
updates:
-package-ecosystem: "npm"
Expand Down
2 changes: 1 addition & 1 deletion content/pages/knowledge-base/articles/website-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ In our case, we provisioned a PostgreSQL v15 database instance within cloud.gov

When queried via the API application, the database will select a number of rows, convert them to a Python dictionary via the [RealDictCursor module](https://www.psycopg.org/docs/extras.html#real-dictionary-cursor), and return that collection.

```
```shell
Bank Name | City | State | Cert | Acquiring Institution | Closing Date | Fund | id
-------------------------+---------------+-------+-------+-------------------------------------+--------------+-------+---
Citizens Bank | Sac City | IA | 8758 | Iowa Trust & Savings Bank | 3-Nov-23 | 10545 | 1
Expand Down
1 change: 1 addition & 0 deletions content/pages/knowledge-base/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: layouts/wide
permalink: "pages/knowledge-base/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber | plus: 1 }}/{% endif %}"
title: cloud.gov Pages knowledge base

pagination:
data: collections.pagesknowledgebase
size: 8
Expand Down
3 changes: 3 additions & 0 deletions content/pages/pages.11tydata.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
navigation: "pages"
};
2 changes: 1 addition & 1 deletion content/pages/pricing.liquid
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
permalink: /pages/pricing/
layout: layouts/page
navigation: pages

title: cloud.gov Pages - Pricing
hidetitle: true
---
Expand Down
2 changes: 1 addition & 1 deletion content/pages/success-stories.liquid
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
permalink: /pages/success-stories/
layout: layouts/page
navigation: pages

title: cloud.gov Pages - Success Stories
hidetitle: true
---
Expand Down

0 comments on commit 39d9914

Please sign in to comment.