Joining the Hub
To include your library documentation in Workleap's Frontend Platform Hub, follow these steps.
Create your Retype website
First, navigate to the Retype getting started guide to set up a Retype website within your library repository.
Basic setup
Then, open the retype.yml file located at the root of the repository and copy/paste the following basic configuration:
# -------------------
# Retype
# -------------------
input: ./docs
output: .retype
url: [THE GITHUB PAGES URL OF YOUR SITE]
branding:
title: [THE NAME OF YOUR LIBRARY]
logo: ./static/logo.png
edit:
repo: [YOUR REPOSITORY]
base: /docs
branch: main
footer:
copyright: "© Copyright {{ year }} - Workleap"
# To allow using {{ }} in code blocks.
# View: https://github.com/retypeapp/retype/issues/622#issuecomment-1712391219.
templating:
enabled: false
showSidebarFilter: false
verbose: true
Finally, add the following script to your package.json file:
{
"dev-docs": "retype start"
}
Please note that Retype is also compatible with .NET projects. If you are working on a .NET project, visit the Retype website for guidance on starting your Retype development.
Try it 🚀
Start your new Retype site by executing the dev-docs script.
Adhere to Workleap's conventions
The following conventions are optional but highly recommend to to guarantee a consistent and unified experience for Workleap's developers within the Workleap Frontend Platform hub.
Icons
First, add Workleap's reversed bleu logo and favicon to the /docs/static folder:
root
├── docs
├──── static
├────── logo.png
├────── favicon.png
Then, configure Retype to use the new assets by including the following configurations to your retype.yml file:
# -------------------
# Retype
# -------------------
branding:
logo: ./static/logo.png
favicon: ./static/favicon.png
Top bar links
Then, add the following links to the top nav bar of your Retype site:
Your Retype links configuration should closely resemble the following configurations
# -------------------
# Retype
# -------------------
links:
- text: Home
icon: home
link: /
- text: Found a bug?
icon: issue-opened
link: [YOUR LINK]
target: blank
- text: Feature requests
icon: comment-discussion
link: [YOUR LINK]
target: blank
- text: Releases
icon: tag
link: [YOUR LINK]
target: blank
- text: Github
icon: mark-github
link: [YOUR LINK]
target: blank
- text: NPM
icon: <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 0H24V24H0V0Z" fill="#CC0000"/><path d="M11.9184 2.57758H2.57764V21.4214H11.9175V7.32958H16.6695V21.4214H21.4215V2.57758H11.9184Z" fill="white"/></svg>
link: [YOUR LINK]
target: blank
Footer links
Then, add the following links to the footer of your Retype site:
Your Retype footer links configuration should closely resemble the following configurations
Retype navigation section/page items
When appropriate, we recommend adding the following section/page item to the main navigation (on the left):
Include the shared CSS customizations file
Our Retype websites share a CSS file that contains several customizations to enhance the default Retype style. To incorporate this file into your Retype site, follow these steps:
Create the _includes/head.html file
Create a _includes/head.html file within the /docs folder:
root
├── docs
├──── _includes
├────── head.html
Link the shared CSS file
Then, open the newly created _includes/head.html file and copy/paste the following content:
Activate pro features
Workleap has acquired an Enterprise license for Retype, which you can locate the key in our secure Vault. To enable Retype's pro features, copy and paste the following configuration into your retype.yml file:
# -------------------
# Retype Pro
# -------------------
poweredByRetype: false
outbound:
enabled: true
icon: ""
breadcrumb:
enabled: true
home: false
toc:
depth: 2
hub:
link: https://workleap.github.io/wl-idp-docs-hub/
alt: Workleap's Frontend Platform homepage
nav:
mode: stack
icons:
mode: none
theme:
base:
nav-badge-margin-left: 0.75rem
start:
pro: true
Configure your Retype wallet
Since we've added the following lines to your retype.yml file:
start:
pro: true
You can now develop a Retype site locally with the pro features without the need for a local Retype wallet. However, if you prefer to set up your local Retype wallet, follow these steps:
- Locate the Retype license key in our secure Vault.
- Utilize the Retype CLI to create your wallet.
Host your site on GitHub pages
To use our Retype enterprise license, and for every hub features of Retype to work properly, the site must be hosted on the https://workleap.github.io domain. As this is a GitHub Pages domain, to join the hub, your Retype site must be deployed with GitHub Pages.
To configure your Retype site to be deployed with GitHub Pages, refer to the following guide.
You don't have to set the Retype Enterprise license key as it's already configured as an organization secret.
Add your site to the hub
Send a PR to the wl-idp-docs-hub GitHub repository to add your site to the hub. Once merged, your site will be automatically added to the Workleap Frontend Platform hub!