From 9e739b9993b81513715d8121841f8b1f1646de8e Mon Sep 17 00:00:00 2001 From: Farhan Attamimi Date: Wed, 24 Jul 2019 16:14:19 -0700 Subject: [PATCH 1/2] Add optional description field --- blogposts/announcing_sourcegraph_2.13.md | 2 +- website/src/components/BlogPosts.tsx | 4 +++- website/src/pages/blog.tsx | 1 + website/src/pages/go.tsx | 1 + website/src/pages/graphql.tsx | 1 + 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/blogposts/announcing_sourcegraph_2.13.md b/blogposts/announcing_sourcegraph_2.13.md index 454ad1a50f1..6a37b512df9 100644 --- a/blogposts/announcing_sourcegraph_2.13.md +++ b/blogposts/announcing_sourcegraph_2.13.md @@ -26,7 +26,7 @@ We're also shipping Sourcegraph extensions that add other new features: - New search keywords for finding places where a package/module is used: - [go.imports:PACKAGE](https://sourcegraph.com/extensions/sourcegraph/go-imports-search) - [js.depends:MODULE](https://sourcegraph.com/extensions/sourcegraph/js-dependency-search) - - [py.imports:PACKAGE](https://sourcegraph.com/extensions/sourcegraph/python-imports-search) + - [py.imports:PACKAGE](https://sourcegraph.com/extensions/sourcegraph/python-imports-search) - [java.imports:DOTTED_CLASS](https://sourcegraph.com/extensions/sourcegraph/java-imports-search) - [php.uses:ALIAS](https://sourcegraph.com/extensions/sourcegraph/php-alias-search) - New [org:GITHUB_ORG search keyword](https://sourcegraph.com/extensions/sourcegraph/org-search) to search among a GitHub organization's repositories diff --git a/website/src/components/BlogPosts.tsx b/website/src/components/BlogPosts.tsx index 909427ec8fb..88976147370 100644 --- a/website/src/components/BlogPosts.tsx +++ b/website/src/components/BlogPosts.tsx @@ -48,7 +48,9 @@ export default class BlogPosts extends React.Component {

- {post.node.excerpt}{' '} + {post.node.frontmatter.description + ? post.node.frontmatter.description + : post.node.excerpt}{' '} Read more

diff --git a/website/src/pages/blog.tsx b/website/src/pages/blog.tsx index d96080cf4d1..9b5e492dff8 100644 --- a/website/src/pages/blog.tsx +++ b/website/src/pages/blog.tsx @@ -50,6 +50,7 @@ export const pageQuery = graphql` publishDate(formatString: "MMMM D, YYYY") slug published + description } html excerpt(pruneLength: 300) diff --git a/website/src/pages/go.tsx b/website/src/pages/go.tsx index efc3b1c8767..a59ba1d308e 100644 --- a/website/src/pages/go.tsx +++ b/website/src/pages/go.tsx @@ -54,6 +54,7 @@ export const pageQuery = graphql` tags publishDate(formatString: "MMMM D, YYYY") slug + description } html excerpt(pruneLength: 300) diff --git a/website/src/pages/graphql.tsx b/website/src/pages/graphql.tsx index 079e45a2531..42b24ea26ca 100644 --- a/website/src/pages/graphql.tsx +++ b/website/src/pages/graphql.tsx @@ -49,6 +49,7 @@ export const pageQuery = graphql` tags publishDate(formatString: "MMMM D, YYYY") slug + description } html excerpt(pruneLength: 300) From 6728de0f18d042a88035c6d291e3658e6aa00b9c Mon Sep 17 00:00:00 2001 From: Farhan Attamimi Date: Wed, 24 Jul 2019 16:19:21 -0700 Subject: [PATCH 2/2] Update thorn description as example --- blogposts/thorn-sunsets-legacy-applications-with-sourcegraph.md | 1 + 1 file changed, 1 insertion(+) diff --git a/blogposts/thorn-sunsets-legacy-applications-with-sourcegraph.md b/blogposts/thorn-sunsets-legacy-applications-with-sourcegraph.md index 737f7f34eda..e6ba3941281 100644 --- a/blogposts/thorn-sunsets-legacy-applications-with-sourcegraph.md +++ b/blogposts/thorn-sunsets-legacy-applications-with-sourcegraph.md @@ -8,6 +8,7 @@ tags: [ slug: thorn-sunsets-legacy-applications-with-sourcegraph heroImage: /case-studies/thorn-sourcegraph-case-study.png published: true +description: "Thorn builds technology to defend children from sexual abuse, helping law enforcement reduce investigation times by 60%, ensuring that more children are found, faster. Sourcegraph is helping Thorn with their mission, by making it safer to deprecate legacy applications—searching all repositories in any branch to find code still relying on legacy architecture." ---