Skip to content

Conversation

@bh0fer
Copy link
Contributor

@bh0fer bh0fer commented Sep 17, 2025

Adds siteConfig options:

export type ShowEditThisPage = 'always' | 'never' | 'loggedIn' | 'teachers' | 'admins';
export type EditThisPageOption = 'github' | 'github-dev' | 'cms';
/**
 * wheter to show the "Edit this page" links on docs and blog pages.
 */
showEditThisPage?: ShowEditThisPage;

/**
 * Options for which edit links to show. Only relevant if `showEditThisPage` is not 'never'.
 * @default ['github', 'github-dev', 'cms']
 * @example To only show the GitHub edit link:
 * ```ts
 * showEditThisPageOptions: ['github']
 * ```
 */
showEditThisPageOptions?: EditThisPageOption[];

/**
 * the URL to the CMS to edit the page. Defaults to '/cms/', but can be
 * redirected to a different path
 * @default '/cms/'
 * @example 'https://teaching-dev.gbsl.website/cms/'
 *
 * OrganizationName and ProjectName will be appended automatically.
 */
editThisPageCmsUrl?: string;

and introduces edit badges at the bottom of the page:

image

@netlify
Copy link

netlify bot commented Sep 17, 2025

Deploy Preview for teaching-dev ready!

Name Link
🔨 Latest commit 42f6c77
🔍 Latest deploy log https://app.netlify.com/projects/teaching-dev/deploys/68cc1ffc79525000088c7554
😎 Deploy Preview https://deploy-preview-245--teaching-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@SilasBerger
Copy link
Contributor

LGTM, cool addition, thanks 🥳

@lebalz lebalz merged commit ff7f1d5 into main Sep 18, 2025
5 checks passed
@lebalz lebalz deleted the feature/customize-edit-buttons branch September 18, 2025 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants