Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nuxt/content/handbook/company/guides/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ If you are comfortable with Git and the command line, you can contribute directl

1. Check out the latest `main` branch.
2. Create a new branch with a descriptive `kebab-case` name.
3. Edit files under `src/handbook/` (the source of truth for handbook content).
3. Edit files under `nuxt/content/handbook/` (the source of truth for handbook content).
4. Commit your changes and push the branch.
5. Open a Pull Request on GitHub and assign a reviewer.
6. Once approved, the reviewer merges the PR.
Expand Down
2 changes: 1 addition & 1 deletion nuxt/content/handbook/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ shared in this handbook.

The handbook can be edited by anyone at FlowFuse using **Nuxt Studio**, our CMS. Click **"Edit this page"** on any handbook page to open the editor, make your changes, and submit them for review. No Git knowledge required.

Engineers and others comfortable with Git can also contribute directly via pull-request on [GitHub](https://github.com/FlowFuse/website/tree/main/src/handbook).
Engineers and others comfortable with Git can also contribute directly via pull-request on [GitHub](https://github.com/FlowFuse/website/tree/main/nuxt/content/handbook).

The handbook is here for the whole company to help maintain. **Contributions are welcome and strongly encouraged**.

Expand Down
21 changes: 18 additions & 3 deletions nuxt/pages/handbook/[...slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ const githubEditUrl = computed(() => {
return `https://github.com/FlowFuse/website/edit/main/nuxt/content/${stem}.md`
})

// Studio mounts its editor on whichever page you are viewing once you have a session, so
// this link only has to carry you through sign-in and back. `?redirect=` is the parameter
// Studio's own keyboard shortcut uses. Docs pages keep their GitHub link, since that
// markdown lives in FlowFuse/flowfuse and Studio is configured for this repository.
const studioRoute = useRuntimeConfig().public.studio?.route || '/_studio'
const studioEditUrl = computed(() => `${studioRoute}?redirect=${encodeURIComponent(route.path)}`)

const breadcrumbItems = computed(() => {
// findPageBreadcrumb excludes the current page unless told otherwise - `current: true`
// includes it so it can be the last, unlinked crumb below.
Expand Down Expand Up @@ -108,9 +115,17 @@ defineOgImage('Default', {
<div class="lg right-nav">
<div class="sticky top-20 w-full mt-4 md:mt-6 px-8">
<HandbookToc :links="page?.body?.toc?.links" />
<div class="text-xs pb-1 text-right mb-4 italic max-lg:hidden">
<a :href="githubEditUrl" target="_blank" rel="noopener">Edit this page</a>
</div>
<!-- Client-only, as pages/docs/[...slug].vue does with its own edit link: /_studio is
a server route with no prerendered file, so hyperlink (the build's link checker,
which cannot be told to ignore a path) reads it as a broken link when it is in
the static HTML. -->
<ClientOnly>
<div class="text-xs pb-1 text-right mb-4 italic max-lg:hidden">
<a :href="studioEditUrl">Edit this page</a>
<span class="px-1" aria-hidden="true">·</span>
<a :href="githubEditUrl" target="_blank" rel="noopener">GitHub</a>
</div>
</ClientOnly>
</div>
</div>

Expand Down