Doc

uDocs leverages Sanity CMS to provide a structured, yet flexible, content management system. It allows for the creation, organization, and publication of documentation directly within the uDocs ecosystem. Sanity's customizable schema-based system enables the creation of documents that can include a variety of content types, making your documentation both informative and engaging.

Accessing the uDocs Studio

To begin, access the uDocs Studio using https://domain/studio where you will manage your documentation. Docs in studio are scopes by language and version which make it easy to manage different language and versions in application.

uDocs Studio

uDocs Studio

Creating a New Document

Document Basics

Select Doc which will present you with supported lanuguage, select language and then select version in which you want to create document. Here you would see all the documents for that specific language and version. Click on top right create doc button, it will open form for creating new document.

Create new document

Create new document

Here, you'll fill out the basic information:

- Title: This is what your document will be called. It's the first thing users see, so make it descriptive.
- Slug: A URL-friendly version of your title. Sanity automatically generates this from your title, but you can customize it if needed.

Setting Language and Version

Link it to a specific version of your application or documentation. This ensures users find the right documentation for the version they're using.

Writing the Document

The heart of your documentation is the content itself. uDocs and Sanity provide a rich text editor for composing your document, including features such as:

- Overview: A brief description of the document. Keep it concise; this often appears in search results and previews.
- Body: The main content of your document. Use the rich text editor to add headings, paragraphs, lists, links, images, code snippets, and more as seen in following image.

Body Components

Body Components

Linking Documents

If your document is part of a larger series, linking to the previous and next documents in the sequence can significantly improve user navigation. uDocs allows you to reference other documents easily, ensuring a cohesive documentation experience.

Preview and Publication

Before publishing, preview your document to ensure it appears as intended. This is crucial for catching any formatting issues or errors.

Preview Content

Preview Content

Add Translation

You have created doc and you want to create same document in different languages then Studio provides you with very simple solution. Just click on Translation button on the top which will show you all the supported languages like following

Languages

Languages

When you will click on other language it will duplicate your current document with different language field. Now you can edit that document according to your needs and publish that.

Doc Translation

Doc Translation

It helps manage all the translations of a specific document easily. You can find all the translation of specific just by navigating to Translation metadata like following

Translation Metadata

Translation Metadata

You can see that translations for specific doc here.

Conclusion

Writing documentation in uDocs with Sanity CMS offers a balance of simplicity and power, enabling you to create detailed, engaging, and well-organized documents. By following the steps outlined in this guide and utilizing the tips provided, you'll be well on your way to producing quality documentation that your users will find invaluable.

Remember, effective documentation is an ongoing process. As your application evolves, so too should your documentation. With uDocs and Sanity CMS, you have all the tools you need to keep your documentation up-to-date and useful.