Skip to content

Commit a69214b

Browse files
committed
enable blog plugin; add some extra redirects
1 parent 8c5e697 commit a69214b

File tree

2 files changed

+128
-122
lines changed

2 files changed

+128
-122
lines changed

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ The role responsible for each step is noted at the beginning.
9595
mailing list.
9696
- **Developer**: Merge the security fix PR
9797
- **Developer**: Release the package and/or deploy the fix as appropriate
98-
- **Developer & Coordinator**: Draft a [blog post](https://github.com/conda-forge/blog) and other
98+
- **Developer & Coordinator**: Draft a [blog post](/blog) and other
9999
announcement texts. This can be done in parallel with the previous steps, but consider using a
100-
[private advisory](https://github.com/conda-forge/blog/security/advisories) for the text.
100+
[private advisory](https://github.com/conda-forge/conda-forge.github.io/security/advisories) for the text.
101101
- **Coordinator**: Publish the security advisory on the announcement date. If applicable, GitHub
102102
will post the CVE to the MITRE database.
103103
- **Coordinator**: Publish the blog post and other announcements (Element chat room, Twitter,

docusaurus.config.js

Lines changed: 126 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const config = {
1616
onBrokenLinks: "throw",
1717
onBrokenMarkdownLinks: "throw",
1818
favicon: "img/favicon.ico",
19-
trailingSlash: undefined,
19+
trailingSlash: true,
2020
staticDirectories: ['static', 'static-sphinx'],
2121

2222
// GitHub pages deployment config.
@@ -56,132 +56,138 @@ const config = {
5656
// breadcrumbs: true,
5757
// ...editUrl,
5858
// },
59-
// blog: {
60-
// showReadingTime: true,
61-
// },
59+
blog: {
60+
showReadingTime: true,
61+
},
6262
theme: {
6363
customCss: require.resolve("./src/css/custom.css"),
6464
},
6565
}),
6666
],
6767
],
6868
plugins: [
69-
// [
70-
// "content-docs",
71-
// /** @type {import('@docusaurus/plugin-content-docs').Options} */
72-
// ({
73-
// id: "community",
74-
// path: "community",
75-
// routeBasePath: "/community",
76-
// breadcrumbs: false,
77-
// }),
78-
// ],
79-
// [
80-
// "content-blog",
81-
// /** @type {import('@docusaurus/plugin-content-blog').Options} */
82-
// ({
83-
// id: "news",
84-
// path: "news",
85-
// routeBasePath: "/docs/user/announcements.html",
86-
// showReadingTime: false,
87-
// blogSidebarTitle: "Latest news",
88-
// blogSidebarCount: 20,
89-
// }),
90-
// ],
69+
// [
70+
// "content-docs",
71+
// /** @type {import('@docusaurus/plugin-content-docs').Options} */
72+
// ({
73+
// id: "community",
74+
// path: "community",
75+
// routeBasePath: "/community",
76+
// breadcrumbs: false,
77+
// }),
78+
// ],
9179
// [
92-
// "@docusaurus/plugin-client-redirects",
93-
// {
94-
// createRedirects(existingPath) {
95-
// // Sphinx site tends to use 00_intro.html instead of index.html, which messes routing
96-
// if (existingPath.endsWith('/00_intro') || existingPath.endsWith('/00_intro/') || existingPath.endsWith('/00_intro.html')) {
97-
// // Redirect from /docs/team/X to /community/X and /docs/support/X to /community/X
98-
// return [
99-
// existingPath.replace('/00_intro', '/'),
100-
// existingPath.replace('/00_intro.html', '/index.html'),
101-
// existingPath.replace('/00_intro.html', '/'),
102-
// ];
103-
// }
104-
// return undefined; // Return a falsy value: no redirect created
105-
// },
106-
// redirects: [
107-
// {
108-
// from: "/blog/posts/2019-12-06-cfep09/",
109-
// to: "/blog/2019/12/06/cfep09/",
110-
// },
111-
// {
112-
// from: "/blog/posts/2020-02-04-GSoC/",
113-
// to: "/blog/2020/02/04/gsoc/",
114-
// },
115-
// {
116-
// from: "/blog/posts/2020-03-05-grayskull/",
117-
// to: "/blog/2020/03/05/grayskull/",
118-
// },
119-
// {
120-
// from: "/blog/posts/2020-03-10-pypy/",
121-
// to: "/blog/2020/03/10/pypy/",
122-
// },
123-
// {
124-
// from: "/blog/posts/2020-07-02-op-risk/",
125-
// to: "/blog/2020/07/02/op-risk/",
126-
// },
127-
// {
128-
// from: "/blog/posts/2020-07-06-scipy-bof/",
129-
// to: "/blog/2020/07/06/scipy-bof/",
130-
// },
131-
// {
132-
// from: "/blog/posts/2020-07-11-R-4/",
133-
// to: "/blog/2020/07/11/r-4/",
134-
// },
135-
// {
136-
// from: "/blog/posts/2020-10-02-versions/",
137-
// to: "/blog/2020/10/02/versions/",
138-
// },
139-
// {
140-
// from: "/blog/posts/2020-10-29-macos-arm64/",
141-
// to: "/blog/2020/10/29/macos-arm64/",
142-
// },
143-
// {
144-
// from: "/blog/posts/2020-11-20-anaconda-tos/",
145-
// to: "/blog/2020/11/20/anaconda-tos/",
146-
// },
147-
// {
148-
// from: "/blog/posts/2020-12-26-year-in-review/",
149-
// to: "/blog/2020/12/26/year-in-review/",
150-
// },
151-
// {
152-
// from: "/blog/posts/2021-02-02-outreachy/",
153-
// to: "/blog/2021/02/02/outreachy/",
154-
// },
155-
// {
156-
// from: "/blog/posts/2021-06-16-graykull-step-by-step/",
157-
// to: "/blog/2021/06/16/graykull-step-by-step/",
158-
// },
159-
// {
160-
// from: "/blog/posts/2021-09-24-travis-security/",
161-
// to: "/blog/2021/09/24/travis-security/",
162-
// },
163-
// {
164-
// from: "/blog/posts/2021-11-03-tensorflow-gpu/",
165-
// to: "/blog/2021/11/03/tensorflow-gpu/",
166-
// },
167-
// {
168-
// from: [
169-
// "/blog/posts/2022-08-19-outreachy-wrap-up-blog-2022/",
170-
// "/blog/2022/08/19/outreachy-wrap-up-blog-2022/",
171-
// ],
172-
// to: "/blog/2022/08/26/outreachy-wrap-up-blog-2022/",
173-
// },
174-
// {
175-
// from: "/blog/posts/2023-03-12-circle-ci-security-breach/",
176-
// to: "/blog/2023/03/12/circle-ci-security-breach/",
177-
// },
178-
// {
179-
// from: "/blog/posts/2023-07-13-installer-security-fixes/",
180-
// to: "/blog/2023/07/13/installer-security-fixes/",
181-
// },
182-
// ],
183-
// },
80+
// "content-blog",
81+
// /** @type {import('@docusaurus/plugin-content-blog').Options} */
82+
// ({
83+
// id: "news",
84+
// path: "news",
85+
// routeBasePath: "/docs/user/announcements.html",
86+
// showReadingTime: false,
87+
// blogSidebarTitle: "Latest news",
88+
// blogSidebarCount: 20,
89+
// }),
18490
// ],
91+
[
92+
"@docusaurus/plugin-client-redirects",
93+
{
94+
createRedirects(existingPath) {
95+
var redirects = [];
96+
if (existingPath.startsWith('/blog/tags/')) {
97+
redirects.push(`/blog/blog/tag/${existingPath.slice(11)}`)
98+
}
99+
if (existingPath == '/blog/archive/') {
100+
redirects.push("/blog/2023/");
101+
redirects.push("/blog/2022/");
102+
redirects.push("/blog/2021/");
103+
redirects.push("/blog/2020/");
104+
redirects.push("/blog/2019/");
105+
}
106+
return redirects;
107+
},
108+
redirects: [
109+
{
110+
from: "/blog/blog/",
111+
to: "/blog/",
112+
},
113+
{
114+
from: "/blog/posts/2019-12-06-cfep09/",
115+
to: "/blog/2019/12/06/cfep09/",
116+
},
117+
{
118+
from: "/blog/posts/2020-02-04-GSoC/",
119+
to: "/blog/2020/02/04/gsoc/",
120+
},
121+
{
122+
from: "/blog/posts/2020-03-05-grayskull/",
123+
to: "/blog/2020/03/05/grayskull/",
124+
},
125+
{
126+
from: "/blog/posts/2020-03-10-pypy/",
127+
to: "/blog/2020/03/10/pypy/",
128+
},
129+
{
130+
from: "/blog/posts/2020-07-02-op-risk/",
131+
to: "/blog/2020/07/02/op-risk/",
132+
},
133+
{
134+
from: "/blog/posts/2020-07-06-scipy-bof/",
135+
to: "/blog/2020/07/06/scipy-bof/",
136+
},
137+
{
138+
from: "/blog/posts/2020-07-11-R-4/",
139+
to: "/blog/2020/07/11/r-4/",
140+
},
141+
{
142+
from: "/blog/posts/2020-10-02-versions/",
143+
to: "/blog/2020/10/02/versions/",
144+
},
145+
{
146+
from: "/blog/posts/2020-10-29-macos-arm64/",
147+
to: "/blog/2020/10/29/macos-arm64/",
148+
},
149+
{
150+
from: "/blog/posts/2020-11-20-anaconda-tos/",
151+
to: "/blog/2020/11/20/anaconda-tos/",
152+
},
153+
{
154+
from: "/blog/posts/2020-12-26-year-in-review/",
155+
to: "/blog/2020/12/26/year-in-review/",
156+
},
157+
{
158+
from: "/blog/posts/2021-02-02-outreachy/",
159+
to: "/blog/2021/02/02/outreachy/",
160+
},
161+
{
162+
from: "/blog/posts/2021-06-16-graykull-step-by-step/",
163+
to: "/blog/2021/06/16/graykull-step-by-step/",
164+
},
165+
{
166+
from: "/blog/posts/2021-09-24-travis-security/",
167+
to: "/blog/2021/09/24/travis-security/",
168+
},
169+
{
170+
from: "/blog/posts/2021-11-03-tensorflow-gpu/",
171+
to: "/blog/2021/11/03/tensorflow-gpu/",
172+
},
173+
{
174+
from: [
175+
"/blog/posts/2022-08-19-outreachy-wrap-up-blog-2022/",
176+
"/blog/2022/08/19/outreachy-wrap-up-blog-2022/",
177+
],
178+
to: "/blog/2022/08/26/outreachy-wrap-up-blog-2022/",
179+
},
180+
{
181+
from: "/blog/posts/2023-03-12-circle-ci-security-breach/",
182+
to: "/blog/2023/03/12/circle-ci-security-breach/",
183+
},
184+
{
185+
from: "/blog/posts/2023-07-13-installer-security-fixes/",
186+
to: "/blog/2023/07/13/installer-security-fixes/",
187+
},
188+
],
189+
},
190+
],
185191
],
186192

187193
themeConfig:
@@ -205,7 +211,7 @@ const config = {
205211
position: "left",
206212
},
207213
{
208-
href: "https://conda-forge.org/blog/",
214+
to: "/blog/",
209215
label: "Blog",
210216
position: "left",
211217
},
@@ -301,7 +307,7 @@ const config = {
301307
},
302308
{
303309
label: "Blog",
304-
href: "https://conda-forge.org/blog/",
310+
to: "/blog/",
305311
},
306312
{
307313
label: "Status",

0 commit comments

Comments
 (0)