Welcome to the CKAN Deployments! This repository serves as a comprehensive guide for deploying CKAN in various environments, including through source code, Docker, Kubernetes, API documentation, additional information, and tips in a a Docusaurus ^1 website.
CKAN [^2] is a powerful open-source data management system that makes it easy to publish, share, and use data. This repository aims to provide detailed documentation to facilitate CKAN deployments in different environments.
This section covers various methods for deploying CKAN:
Here you can find complete documentation for the CKAN API, including endpoints, parameters and examples of use with Swagger ^3.
This documentation is deployed using GitHub Pages. To deploy the documentation locally run the following commands:
# To preview your changes as you edit the files, you can run a local development server that will serve your website and reflect the latest changes.
npm install
npm run start
#To build the website:
npm run build
# It is important to test your build locally before deploying it for production. Docusaurus provides a docusaurus serve command for that:
npm run serve
Run the development server:
cd my-website
npm run start
[!TIP] The
cd
command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.The
npm run start
command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.npm run start -- --locale es
to test the Spanish locale.Open
docs/intro.md
and edit some lines: the site reloads automatically and displays your changes.
Configure your site and add the navbar item of type localeDropdown
so that users can select the locale they want :
const config: Config = {
title: 'CKAN Docs',
tagline: 'Deployments and more!',
favicon: 'img/favicon.ico',
...
// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en', 'fr', 'fa'],
localeConfigs: {
en: {
htmlLang: 'en-GB',
},
// You can omit a locale (e.g. fr) if you don't need to override the defaults
fa: {
direction: 'rtl',
},
},
},
...
themeConfig: {
navbar: {
items: [
{
type: 'localeDropdown',
position: 'left',
},
],
},
},
};
Run the write-translations
command:
npm run write-translations -- --locale fr
It will extract and initialize the JSON translation files that you need to translate. The code.json file at the root includes all translation API calls extracted from the source code, which could either be written by you or provided by the themes, some of which may already be translated by default.
Copy your docs Markdown files from docs/
to i18n/fr/docusaurus-plugin-content-docs/current
, and translate them:
mkdir -p i18n/fr/docusaurus-plugin-content-docs/current
cp -r docs/** i18n/fr/docusaurus-plugin-content-docs/current
Translate the mdx
files.
[!TIP] More information about translation and tutorials from i18n in the Docusaurus documentation: Docusaurus. Internationalisation
Contributions to this documentation repository are welcome! If you have suggestions, improvements, or would like to report issues, please feel free to submit a pull request or open an issue.
This documentation is licensed under the GNU Affero General Public License (AGPL).
[^2]: CKAN: An open source DMS