From 3bef22af065b4ac20fd28f4ff2c3c6b025818bed Mon Sep 17 00:00:00 2001 From: Pomax Date: Sun, 22 Nov 2020 10:20:30 -0800 Subject: [PATCH] fixed RSS ordering --- docs/index.html | 2 +- docs/ja-JP/index.html | 2 +- docs/news/2020-09-18.html | 2 +- docs/news/2020-11-22.html | 2 +- docs/news/index.html | 2 +- docs/news/rss.xml | 26 +++++++++++++------------- docs/uk-UA/index.html | 2 +- docs/zh-CN/index.html | 2 +- src/build/create-news-pages.js | 6 +++++- 9 files changed, 25 insertions(+), 21 deletions(-) diff --git a/docs/index.html b/docs/index.html index 5b2d0988..73f83a4d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -38,7 +38,7 @@ - + diff --git a/docs/ja-JP/index.html b/docs/ja-JP/index.html index 2ee94444..0dc60568 100644 --- a/docs/ja-JP/index.html +++ b/docs/ja-JP/index.html @@ -41,7 +41,7 @@ - + diff --git a/docs/news/2020-09-18.html b/docs/news/2020-09-18.html index 612c6637..24026dfd 100644 --- a/docs/news/2020-09-18.html +++ b/docs/news/2020-09-18.html @@ -34,7 +34,7 @@ - + diff --git a/docs/news/2020-11-22.html b/docs/news/2020-11-22.html index c955b352..2f7e31b6 100644 --- a/docs/news/2020-11-22.html +++ b/docs/news/2020-11-22.html @@ -34,7 +34,7 @@ - + diff --git a/docs/news/index.html b/docs/news/index.html index 1df6d07a..6256e960 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -33,7 +33,7 @@ - + diff --git a/docs/news/rss.xml b/docs/news/rss.xml index 8bc79c85..e5fc5881 100644 --- a/docs/news/rss.xml +++ b/docs/news/rss.xml @@ -6,7 +6,7 @@ News updates for the primer on Bézier Curves by Pomax en-GB - Sun Nov 22 2020 10:06:08 +00:00 + Sun Nov 22 2020 10:19:03 +00:00 https://pomax.github.io/bezierinfo/images/og-image.png A Primer on Bézier Curves @@ -14,6 +14,18 @@ + Curve-circle intersections + https://pomax.github.io/bezierinfo/news/2020-11-22.html + + +<p>While the primer covered line/line, line/curve, and curve/curve intersections, there was one other obvious intersection conspicuously missing: circle/curve intersections. You'd think those were just an extension on the maths used for the other three, but unfortunately, this is not the case. Rather than using calculus, the only real way to determine where a polynomial curve intersects it is to sample the curve at a resolution high enough to find you intervals on the curve where there likely is an intersection, then refining that interval until you find actual intersections.</p> +<p>It is, in fact, rather similar to <a href="https://pomax.github.io/bezierinfo/#projections">projecting a point onto a bezier curve</a> where the point is the circle's center, and where the projection distance actually needs to match the circle radius, so: <a href="https://pomax.github.io/bezierinfo/#circleintersection">let's see how to do that</a>!</p> +<p>— <a href="https://twitter.com/TheRealPomax">Pomax</a></p> + + + Sat Nov 21 2020 16:00:00 +00:00 + 2020-11-22.html + Rewriting the tech stack https://pomax.github.io/bezierinfo/news/2020-09-18.html @@ -109,18 +121,6 @@ draw() { Thu Sep 17 2020 17:00:00 +00:00 2020-09-18.html - - Curve-circle intersections - https://pomax.github.io/bezierinfo/news/2020-11-22.html - - -<p>While the primer covered line/line, line/curve, and curve/curve intersections, there was one other obvious intersection conspicuously missing: circle/curve intersections. You'd think those were just an extension on the maths used for the other three, but unfortunately, this is not the case. Rather than using calculus, the only real way to determine where a polynomial curve intersects it is to sample the curve at a resolution high enough to find you intervals on the curve where there likely is an intersection, then refining that interval until you find actual intersections.</p> -<p>It is, in fact, rather similar to <a href="https://pomax.github.io/bezierinfo/#projections">projecting a point onto a bezier curve</a> where the point is the circle's center, and where the projection distance actually needs to match the circle radius, so: <a href="https://pomax.github.io/bezierinfo/#circleintersection">let's see how to do that</a>!</p> -<p>— <a href="https://twitter.com/TheRealPomax">Pomax</a></p> - - - Sat Nov 21 2020 16:00:00 +00:00 - 2020-11-22.html diff --git a/docs/uk-UA/index.html b/docs/uk-UA/index.html index d7ffa037..c25052b4 100644 --- a/docs/uk-UA/index.html +++ b/docs/uk-UA/index.html @@ -39,7 +39,7 @@ - + diff --git a/docs/zh-CN/index.html b/docs/zh-CN/index.html index 63a0854b..5218d8aa 100644 --- a/docs/zh-CN/index.html +++ b/docs/zh-CN/index.html @@ -41,7 +41,7 @@ - + diff --git a/src/build/create-news-pages.js b/src/build/create-news-pages.js index 1d9a3864..eedd4b34 100644 --- a/src/build/create-news-pages.js +++ b/src/build/create-news-pages.js @@ -100,7 +100,11 @@ function generateNewsIndex(details) { function generateRSSFeed(details) { const now = new Date().toString(); const renderContext = { - items: details, + items: details.sort((a, b) => { + a = a.filename; + b = b.filename; + return a < b ? 1 : b < a ? -1 : 0; + }), buildDate: `${now.substring(0, now.indexOf(`GMT`) - 1)} +00:00`, }; const index = nunjucks.render(`rss.template.xml`, renderContext);