Skip to content

Commit 6cf685a

Browse files
fix: remove [Edit this page] from the workflows category page
1 parent 278ade6 commit 6cf685a

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

site_jaspr/lib/components/edit_page_link.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ import 'package:jaspr_content/jaspr_content.dart';
1313
class EditPageLink extends StatelessComponent {
1414
const EditPageLink({super.key});
1515

16-
static const _editUrlBase =
17-
'https://github.com/VeryGoodOpenSource/very_good_workflows/tree/main/site';
16+
static const _editUrlBase = 'https://github.com/VeryGoodOpenSource/very_good_workflows/tree/main/site';
1817

1918
@override
2019
Component build(BuildContext context) {
@@ -23,8 +22,8 @@ class EditPageLink extends StatelessComponent {
2322
if (kIsWeb) return Component.fragment([]);
2423

2524
final url = context.page.url;
26-
// Only render on /docs/* pages.
27-
if (!url.startsWith('/docs/')) return Component.fragment([]);
25+
// Only render on /docs/* pages, but not the workflows category index.
26+
if (!url.startsWith('/docs/') || url == '/docs/workflows') return Component.fragment([]);
2827

2928
// /docs/workflows/license_check → docs/workflows/license_check.md
3029
final filePath = '${url.replaceFirst('/', '')}.md';

0 commit comments

Comments
 (0)