Skip to content

Commit

Permalink
Merge pull request #41 from cloud-gov/chore-auto-generated-excerpts
Browse files Browse the repository at this point in the history
content updates from cg and updated how meta page descriptions are ge…
  • Loading branch information
hursey013 authored Dec 9, 2024
2 parents 586d0b3 + 566d390 commit 759eae3
Show file tree
Hide file tree
Showing 6 changed files with 4,093 additions and 5,425 deletions.
12 changes: 8 additions & 4 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const inspect = require("util").inspect;
const striptags = require("striptags");
const path = require("path");
const matter = require('gray-matter');
const { JSDOM } = require("jsdom");


// Helper function to synchronously determine if a file exists
Expand Down Expand Up @@ -79,7 +80,6 @@ function getPageData(filePath) {
return pageData;
}


module.exports = function (config) {
// Set pathPrefix for site
let pathPrefix = '/';
Expand Down Expand Up @@ -110,9 +110,13 @@ module.exports = function (config) {

// Determine if the table of contents should be shown, at time of writing used on the docs.html layout
config.addFilter("isTocEmpty", (content) => {
const result = content === undefined || content === null || content === "" || content === " " || content === '<nav class="toc" ><ol></ol></nav>';
console.error("ERR RESULT!!!!!", result, content);
return result;
return content === undefined || content === null || content === "" || content === " " || content === '<nav class="toc" ><ol></ol></nav>';
});

config.addFilter("domQuery", (content, selector) => {
const dom = new JSDOM(content);
const body = dom.window.document.querySelector(selector);
return !!body ? body.textContent : content;
});

// Add plugins
Expand Down
4 changes: 1 addition & 3 deletions _includes/meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@
{% assign summary = description %}
{% elsif excerpt != undefined %}
{% assign summary = excerpt %}
{% elsif title != undefined %}
{% assign summary = title %}
{% else %}
{% assign summary = site.title %}
{% assign summary = content | domQuery: '#main-content' | striptags | truncatewords: 50 %}
{% endif %}

<title>{{title}} | {{site.title}}</title>
Expand Down
14 changes: 7 additions & 7 deletions content/index.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ manage in the long term.

<div class="grid-row grid-gap">
<div class="tablet:grid-col-5 usa-prose bar-top">
<p><a href="{{ site.baseurl }}/docs/overview/what-is-cloudgov/" class="cg-arrow">Platform
<p><a href="{{ '/docs/overview/what-is-cloudgov/' | url }}" class="cg-arrow">Platform
overview</a></p>
<p><a href="{{ site.baseurl }}/pricing/" class="cg-arrow">Packages and pricing</a></p>
<p><a href="{{ site.baseurl }}/docs/overview/enterprise-approach-to-cloud/" class="cg-arrow">Enterprise
<p><a href="{{ '/pricing/' | url }}" class="cg-arrow">Packages and pricing</a></p>
<p><a href="{{ '/docs/overview/enterprise-approach-to-cloud/' | url }}" class="cg-arrow">Enterprise
accounts</a></p>
<p><a href="{{ site.baseurl }}/docs/technology/responsibilities/" class="cg-arrow">Security and
<p><a href="{{ '/docs/technology/responsibilities/' | url }}" class="cg-arrow">Security and
compliance</a></p>
</div>
</div>
Expand Down Expand Up @@ -70,10 +70,10 @@ manage in the long term.
<div class="grid-row">
<div class="tablet:grid-col padding-4 bg-accent-warm-light">
<p class="usa-intro tablet:grid-col-10">
Follow our <a href="{{ site.baseurl }}/sign-up/">quickstart guide</a> to start a free trial account
and watch <a href="{{ site.baseurl }}/sign-up/#go-build-in-your-sandbox">video tutorials</a> that
Follow our <a href="{{ '/sign-up/' | url }}">quickstart guide</a> to start a free trial account
and watch <a href="{{ '/sign-up/#go-build-in-your-sandbox' | url }}">video tutorials</a> that
walk through creating apps in your sandbox.</p>
<p><a href="{{ site.baseurl }}/sign-up/" class="usa-button usa-button--big">Try cloud.gov for free</a>
<p><a href="{{ '/sign-up/' | url }}" class="usa-button usa-button--big">Try cloud.gov for free</a>
</p>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions content/news/articles/2024-11-21-new-logging-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: layouts/post
title: "Announcing Cloud.gov Logging system update"
date: 2024-11-21 00:00:00 +00:00
excerpt: The Cloud.gov is upgrading the current application logging system in December 2024, and decommissioning the old system.
excerpt: The Cloud.gov is upgrading the current application logging system in December 2024, and decommissioning the old system.
---
# Cloud.gov customer notice: Major upgrade of application logging system in December

Expand All @@ -23,7 +23,7 @@ The current logging system is based on a branch of the [Elastic ELK stack ](http
* Meets M-21-31 requirements for live logging access
* Better tenant isolation: The updated system uses OpenSearch Organizations and a new authorization system to improve multitenancy. The new architecture resolves a variety of errors for customers.
* Better performance, better security, and better upgrade paths
* New: Logs for brokered RDS database instances are now available
* New: Logs for brokered RDS database instances are now available. [**Please note that only databases which are configured to publish their logs to CloudWatch will have their logs ingested into our new logging system**](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.Procedural.UploadtoCloudWatch.html).
* New: JSON log parsing. JSON logs are now ingested using the [flat_object field type in OpenSearch](https://opensearch.org/docs/latest/field-types/supported-field-types/flat-object/). [The flat_object field type allows for searching nested fields of a JSON object using dot notation](https://opensearch.org/docs/latest/field-types/supported-field-types/flat-object/#using-flat-object) but does not require the overhead of custom fields in the index, which is more performant and prevents custom logs from being dropped because of index field limits.
* Coming Soon:
* Support for alerting, and routing alerts to external systems
Expand Down
Loading

0 comments on commit 759eae3

Please sign in to comment.