Welcome to Knokd documentation!
The Knokd Docs are built on top of Protocol Tailwind UI. In this Readme you can learn about:
At this time, nested URLs are supported (e.g. docs.knokd.com/welcome-to-knokd/benefits
), but the sidebar navigation only supports two levels. That is, the sidebar supports:
Section Heading > Document > Sub-sections
, where Section Heading
has no content, it is merely a heading. The page URL is composed of /section-heading/document#sub-section
.
For example:
Welcome to Knokd
|_ # Benefits
|_ ## Notes
|_ ## Properties
|_ ## Libraries
|_ # How Knokd works
|_ ...
|_ ...
Realtor Cooperation Policy
|_
|_
...
The lowest level, e.g. "Notes" is a section on the Benefits page, not it's own page.
Knokd docs can be edited directly in GitHub.
You will find all Knokd docs stored in the /src/app/
folder. This application generates a static site based on all the instances of page.mdx
found in the subfolders of /src/app/
.
/src/app/
folder in GitHub./realtor-cooperation-policy
/types-of-listings
page.mdx
file inside that folder.
For example: The GitHub file at /src/app/listings/types-of-listings/page.mdx
corresponds to the public URL https://docs.knokd.com/listings/types-of-listings
. page.mdx
file.With the modal that pops open, follow these best practices to make your commit:
@knokd.com
address unless you're a third-party helper.To create the pull request:
@
key to see a list within your organization. If you know their GitHub handle, you can type that in, e.g. @andrewpaliga
.page.mdx
files, or you can use the rich text editor option to format your pull request description.Later, when a pull request is accepted and "Merged", it will become part of the live code base, and Vercel will automatically re-build and re-deploy the site in about 2 minutes.
I made a custom component to handle screenshots. It has two implementations - one for desktop and one for mobile. Use the 'mobile flag' to limit the width of the image container. This is recommended if the source image has a narrow format, e.g. from a mobile screen capture.
To include a screenshot in a doc page:
/public/images/screenshots/
folder, or within a well-named subfolder there.import { Screenshot } from '@/components/Screenshot'
page.mdx
, open a <Screenshot
component, include an image src
and alt
attributes before the closing />
tag. Desktop screenshots:
<Screenshot
src="https://github.com/Knokd/docs.knokd.com/raw/main/images/screenshots/welcome-to-knokd/welcome-screen-overlay.jpg"
alt="Showcasing both the deskptop and mobile view of Knokd Listings page"
/>
Mobile screenshots:
Add the flag / attribute mobile={true}
to invoke the limited width (380px)
<Screenshot
mobile={true}
src="https://github.com/Knokd/docs.knokd.com/raw/main/images/screenshots/welcome-to-knokd/narrow-image.png"
alt="Testing a mobile images" />
This section of the readme is for people with development environments set up. It is not required to make edits to the documentation.
Protocol is a Tailwind UI site template built using Tailwind CSS and Next.js.
To get started with this template, first install the npm dependencies:
npm install
Next, run the development server:
npm run dev
Finally, open http://localhost:3000 in your browser to view the website.
You can start editing this template by modifying the files in the /src
folder. The site will auto-update as you edit these files.
This template includes a global search that's powered by the FlexSearch library. It's available by clicking the search input or by using the ⌘K
shortcut.
This feature requires no configuration, and works out of the box by automatically scanning your documentation pages to build its index. You can adjust the search parameters by editing the /src/mdx/search.mjs
file.
This site template is a commercial product and is licensed under the Tailwind UI license.
To learn more about the technologies used in this site template, see the following resources: