From 542bd02132c9281e65a99939ff8d67eefb59119b Mon Sep 17 00:00:00 2001 From: cburroughs Date: Mon, 26 Aug 2024 14:25:02 -0400 Subject: [PATCH] consistently "truncate" blogs and resolve Docusaurus warnings (#254) Since the update to 3.5, Docusaurus has spit out this new WARNING ``` [WARNING] Docusaurus found blog posts without truncation markers: - "blog/2024-07-01-building-linux-on-osx-silicon/index.mdx" - "blog/2024-06-13-announcing-klaviyo-sponsorship/index.mdx" - "blog/2024-04-27-simple-versioning-with-git-tags/index.mdx" We recommend using truncation markers (`` or `{/* truncate */}`) in blog posts to create shorter previews on blog paginated lists. Tip: turn this security off with the `onUntruncatedBlogPosts: 'ignore'` blog plugin option. ``` To resolve this I've: * Added `truncate` to those blog posts that were missing it * Moved the `truncate` for 2024 blog posts to always capture at least a little text (and not just the splash image). --- blog/2024-01-24-pants-2-19/index.mdx | 4 ++-- .../index.mdx | 4 ++-- blog/2024-03-27-pants-2-20/index.mdx | 4 ++-- blog/2024-04-27-simple-versioning-with-git-tags/index.mdx | 2 ++ blog/2024-05-29-pants-2-21/index.mdx | 4 ++-- blog/2024-06-13-announcing-klaviyo-sponsorship/index.mdx | 2 ++ blog/2024-07-01-building-linux-on-osx-silicon/index.mdx | 2 ++ blog/2024-08-24-venerable-pythons/index.mdx | 4 ++-- 8 files changed, 16 insertions(+), 10 deletions(-) diff --git a/blog/2024-01-24-pants-2-19/index.mdx b/blog/2024-01-24-pants-2-19/index.mdx index 5cbf10a46..7c4aa86f7 100644 --- a/blog/2024-01-24-pants-2-19/index.mdx +++ b/blog/2024-01-24-pants-2-19/index.mdx @@ -12,8 +12,6 @@ [Unsplash](https://unsplash.com/photos/mountains-covered-with-snow-d3pTF3r_hwY?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash) -{/* truncate */} - We're pleased to announce Pants 2.19.0, the latest release of [Pantsbuild, the scalable and ergonomic build system](https://www.pantsbuild.org/). To update, set `pants_version = "2.19.0"` in your `pants.toml`. If you're not using Pants yet, [get started now](https://www.pantsbuild.org/docs/getting-started). _Highlights in 2.19 include_: @@ -24,6 +22,8 @@ _Highlights in 2.19 include_: - Using `parametrize` to set multiple fields in tandem - And lots of smaller features, bugfixes, and general improvements +{/* truncate */} + Keep reading to see more, or check the [full release notes](https://github.com/pantsbuild/pants/tree/2.19.x/src/python/pants/notes/2.19.x.md). Pants is an open-source project, and the below changes are all contributed by our community. If you want to see something more in the next changelog, join us on [GitHub](https://github.com/pantsbuild/pants) and become a contributor. We also offer [formal sponsorship tiers for companies](https://www.pantsbuild.org/sponsorship), as well as individual sponsorships via [GitHub](https://github.com/sponsors/pantsbuild). These help pay for the ongoing development and hosting costs, and are managed by the Pants Build non-profit organization. diff --git a/blog/2024-01-25-inspecting-dependency-inference-results/index.mdx b/blog/2024-01-25-inspecting-dependency-inference-results/index.mdx index 0e2f9c049..16139e252 100644 --- a/blog/2024-01-25-inspecting-dependency-inference-results/index.mdx +++ b/blog/2024-01-25-inspecting-dependency-inference-results/index.mdx @@ -12,10 +12,10 @@ [Unsplash](https://unsplash.com/photos/magnifying-glass-near-gray-laptop-computer-d9ILr-dbEdg) -{/* truncate */} - An important distinguishing feature of Pants v2 is its ability to automatically [infer your code's internal and external dependencies](https://www.pantsbuild.org/blog/2022/10/27/why-dependency-inference). The information about those inferences is available via the `dependencies` and `peek` goals, so that metadata about what modules import from other modules is always readily accessible to you. +{/* truncate */} + While managing a codebase in a [Pants-supported language](https://www.pantsbuild.org/2.18/docs/introduction/welcome-to-pants#which-languages-and-frameworks-does-pants-support) (e.g. Python, Java, Scala, etc...), it can sometimes be useful dig deeper and explore the inferred dependencies in order to compare them to your source code's import statements. This can be particularly useful for large modules with many imports, where it's very easy to miss an omitted dependency or an inferred dependency that should have been ignored. You can start your exploration with one of the lesser known goals, [`python-dump-source-analysis`](https://www.pantsbuild.org/2.18/reference/goals/python-dump-source-analysis). This goal will dump the dependency analysis for the Python source code build targets. diff --git a/blog/2024-03-27-pants-2-20/index.mdx b/blog/2024-03-27-pants-2-20/index.mdx index 0ca33244a..7588d67ce 100644 --- a/blog/2024-03-27-pants-2-20/index.mdx +++ b/blog/2024-03-27-pants-2-20/index.mdx @@ -12,8 +12,6 @@ [Unsplash](https://unsplash.com/photos/moon-eclipse-F-pSZO_jeE8) -{/* truncate */} - We are pleased to announce Pants 2.20.0, the latest release of [Pantsbuild, the scalable and ergonomic build system](https://www.pantsbuild.org/). To update, set `pants_version = "2.20.0"` in your `pants.toml`. If you're not using Pants yet, [get started now](https://www.pantsbuild.org/docs/getting-started). _Highlights in 2.20 include_: @@ -29,6 +27,8 @@ _Highlights in 2.20 include_: - 🐋 Experimental support for [Podman](https://podman.io/) with `pants.backend.experimental.docker.podman`. - 📈 And lots of smaller features, bugfixes, and general improvements +{/* truncate */} + Check out the [full release notes](https://github.com/pantsbuild/pants/tree/2.20.x/src/python/pants/notes/2.20.x.md). Pants is an open-source project, and the changes are all contributed by our community. If you want to see something more in the next changelog, join us on [GitHub](https://github.com/pantsbuild/pants) and become a contributor. We also offer [formal sponsorship tiers for companies](https://www.pantsbuild.org/sponsorship), as well as individual sponsorships via [GitHub](https://github.com/sponsors/pantsbuild). These help pay for the ongoing development and hosting costs, and are managed by the Pants Build non-profit organization. diff --git a/blog/2024-04-27-simple-versioning-with-git-tags/index.mdx b/blog/2024-04-27-simple-versioning-with-git-tags/index.mdx index f009938d2..a6c41d4c7 100644 --- a/blog/2024-04-27-simple-versioning-with-git-tags/index.mdx +++ b/blog/2024-04-27-simple-versioning-with-git-tags/index.mdx @@ -9,6 +9,8 @@ A frequently asked question on [Pants Slack](/community/getting-help) is how to set a version - such as for a docker image, helm chart or Python distribution - based on git state. +{/* truncate */} + Pants does have various solutions for this, but they tend to be too complicated, or too limited: diff --git a/blog/2024-05-29-pants-2-21/index.mdx b/blog/2024-05-29-pants-2-21/index.mdx index 657516d6f..a10e28773 100644 --- a/blog/2024-05-29-pants-2-21/index.mdx +++ b/blog/2024-05-29-pants-2-21/index.mdx @@ -12,8 +12,6 @@ [Unsplash](https://unsplash.com/photos/a-purple-and-purple-sky-with-trees-in-the-foreground-tr1nv_cLVP0) -{/* truncate */} - We are pleased to announce Pants [2.21.0](<(https://github.com/pantsbuild/pants/tree/2.21.x/src/python/pants/notes/2.21.x.md)>), the latest release of [Pantsbuild, the scalable and ergonomic build system](https://www.pantsbuild.org/). To update, set `pants_version = "2.21.0"` in your `pants.toml`. If you're not using Pants yet, [get started now](https://www.pantsbuild.org/docs/getting-started). _Highlights in [2.21](<(https://github.com/pantsbuild/pants/tree/2.21.x/src/python/pants/notes/2.21.x.md)>) include_: @@ -29,6 +27,8 @@ _Highlights in [2.21](<(https://github.com/pantsbuild/pants/tree/2.21.x/src/pyth - 🪜 Scalafix can now be run by Pants using the [new `pants.backend.experimental.scala.lint.scalafix` backend](https://www.pantsbuild.org/2.21/docs/jvm/java-and-scala#fix-scala-code). - 📈 And lots of smaller features, update, bugfixes, and general improvements +{/* truncate */} + Check out the [full release notes](https://github.com/pantsbuild/pants/tree/2.21.x/src/python/pants/notes/2.21.x.md). Pants is an open-source project, and the changes are all contributed by our community. If you want to see something more in the next changelog, join us on [GitHub](https://github.com/pantsbuild/pants) and become a contributor. We also offer [formal sponsorship tiers for companies](https://www.pantsbuild.org/sponsorship), as well as individual sponsorships via [GitHub](https://github.com/sponsors/pantsbuild). These help pay for the ongoing development and hosting costs, and are managed by the Pants Build non-profit organization. diff --git a/blog/2024-06-13-announcing-klaviyo-sponsorship/index.mdx b/blog/2024-06-13-announcing-klaviyo-sponsorship/index.mdx index 48a5c78f1..f295fbe1e 100644 --- a/blog/2024-06-13-announcing-klaviyo-sponsorship/index.mdx +++ b/blog/2024-06-13-announcing-klaviyo-sponsorship/index.mdx @@ -9,6 +9,8 @@ Today we are excited to announce that [Klaviyo](https://www.klaviyo.com/) has become the first Platinum sponsor of the Pants project via the [corporate sponsorship program](https://www.pantsbuild.org/sponsorship#corporate-sponsorship)! This is one of the first such sponsorships through our new [Open Source Sponsorship program](https://klaviyo.tech/inaugurating-our-open-source-sponsorship-program-df0572cc9c18), through which we are trying to support the open source projects we depend on. While the core development and maintenance of Pants is volunteer driven, there are costs involved with maintaining and distributing such a large piece of software, costs which far too often are covered by individual volunteers. We benefit enormously from this project and want to help contribute to its ongoing success. +{/* truncate */} + Klaviyo chose Pants as the build system for our backend monorepo 18 months ago (read about how we chose Pants [here](https://klaviyo.tech/why-we-chose-pants-906891a98a6e)). Since then, we have been impressed not only by the power, flexibility and ease of use relative to other systems that Pants offers, but also by the amazing community that surrounds it. It is truly the Pants community that sets it apart, from active development efforts to the vibrant and welcoming Slack. This community is a prime reason we chose Pants, and is what we hope to foster with our sponsorship. Like all software of this size, we recognize there are costs associated with the development of Pants - from compute costs for CI, to hosting for the incredible documentation site. We are happy to help fund these costs so that the project and community can continue to grow. We hope that our initial sponsorship will prompt other commercial businesses using Pants to do the same, at any level of support, helping to support a growing Pants community for years to come. diff --git a/blog/2024-07-01-building-linux-on-osx-silicon/index.mdx b/blog/2024-07-01-building-linux-on-osx-silicon/index.mdx index eb1791035..a2800f576 100644 --- a/blog/2024-07-01-building-linux-on-osx-silicon/index.mdx +++ b/blog/2024-07-01-building-linux-on-osx-silicon/index.mdx @@ -10,6 +10,8 @@ Pants has supported running portions of the build in docker containers for [a while](https://www.pantsbuild.org/blog/2023/02/24/pants-2-15), but the exact configuration is a little tricky, particularly if you want to build x86_64 containers on Apple ARM processors. +{/* truncate */} + The recipe itself is very straight forward, adding these two sections to your root BUILD and pants.toml files will build your python binaries and docker containers for Linux/x64 on both Linux & OSX: ```bash title="BUILD" diff --git a/blog/2024-08-24-venerable-pythons/index.mdx b/blog/2024-08-24-venerable-pythons/index.mdx index 6366387d2..358a6b2ec 100644 --- a/blog/2024-08-24-venerable-pythons/index.mdx +++ b/blog/2024-08-24-venerable-pythons/index.mdx @@ -11,10 +11,10 @@ [Unsplash](https://unsplash.com/photos/python-resting-its-head-on-body-yrcaXCWe0VY) -{/* truncate */} - The Python development community concurrently supports multiple version of the Python programming language. These are in various states such as "prerelease", "bugfix", "security", or "end-of-life". For example version 3.12 is currently in "bugfix" while 3.8 is the oldest still receiving security updates. The cadence of future release is currently governed by [PEP 602 – Annual Release Cycle for Python](https://peps.python.org/pep-0602/) +{/* truncate */} + Circa 2024 the state of [all Python versions](https://devguide.python.org/versions/) look something like: ![CPython Release Status](./cpython-release-status.png)