2022-05-29 19:15:01 +02:00
|
|
|
// @ts-check
|
|
|
|
// Note: type annotations allow type checking and IDEs autocompletion
|
|
|
|
|
2022-11-26 23:16:38 +02:00
|
|
|
const {
|
|
|
|
DISCORD_URL,
|
2023-01-02 02:24:16 +02:00
|
|
|
GITHUB_URL,
|
|
|
|
MASTODON_URL,
|
|
|
|
TWITTER_URL
|
2022-11-26 23:16:38 +02:00
|
|
|
} = require('./constants');
|
2022-09-17 18:51:54 +02:00
|
|
|
const lightCodeTheme = require('./src/themes/prismLight');
|
|
|
|
const darkCodeTheme = require('./src/themes/prismDark');
|
2022-05-29 19:15:01 +02:00
|
|
|
|
2023-05-18 14:24:25 +02:00
|
|
|
const { getTranslationProgress } = require('./src/api/crowdin.js');
|
2022-05-29 19:15:01 +02:00
|
|
|
|
2023-05-18 14:24:25 +02:00
|
|
|
const getConfig = async () => {
|
|
|
|
const translationProgress = await getTranslationProgress();
|
2022-05-29 19:15:01 +02:00
|
|
|
|
2023-05-18 14:24:25 +02:00
|
|
|
/** @type {import('@docusaurus/types').Config} */
|
|
|
|
const config = {
|
|
|
|
title: 'Task',
|
|
|
|
tagline: 'A task runner / simpler Make alternative written in Go ',
|
|
|
|
url: 'https://taskfile.dev',
|
|
|
|
baseUrl: '/',
|
|
|
|
onBrokenLinks: 'throw',
|
|
|
|
onBrokenMarkdownLinks: 'throw',
|
|
|
|
favicon: 'img/favicon.ico',
|
2022-05-29 19:15:01 +02:00
|
|
|
|
2023-05-18 14:24:25 +02:00
|
|
|
organizationName: 'go-task',
|
|
|
|
projectName: 'task',
|
|
|
|
deploymentBranch: 'gh-pages',
|
|
|
|
|
|
|
|
i18n: {
|
|
|
|
defaultLocale: 'en',
|
2023-07-25 02:32:37 +02:00
|
|
|
locales: [
|
|
|
|
'en',
|
|
|
|
'es-ES',
|
|
|
|
'fr-FR',
|
|
|
|
'ja-JP',
|
|
|
|
'pt-BR',
|
|
|
|
'ru-RU',
|
|
|
|
'tr-TR',
|
|
|
|
'zh-Hans'
|
|
|
|
],
|
2023-05-18 14:24:25 +02:00
|
|
|
localeConfigs: {
|
|
|
|
en: {
|
|
|
|
label: 'English',
|
|
|
|
direction: 'ltr',
|
|
|
|
htmlLang: 'en-US'
|
2022-05-29 19:15:01 +02:00
|
|
|
},
|
2023-07-25 02:32:37 +02:00
|
|
|
'es-ES': {
|
|
|
|
label: `Español (${translationProgress['es-ES'] || 0}%)`,
|
|
|
|
direction: 'ltr',
|
|
|
|
htmlLang: 'es-ES'
|
|
|
|
},
|
2023-05-18 14:24:25 +02:00
|
|
|
'fr-FR': {
|
|
|
|
label: `Français (${translationProgress['fr'] || 0}%)`,
|
|
|
|
direction: 'ltr',
|
|
|
|
htmlLang: 'fr-FR'
|
2022-05-29 19:15:01 +02:00
|
|
|
},
|
2023-07-25 02:32:37 +02:00
|
|
|
'ja-JP': {
|
|
|
|
label: `日本語 (${translationProgress['ja'] || 0}%)`,
|
|
|
|
direction: 'ltr',
|
|
|
|
htmlLang: 'ja-JP'
|
|
|
|
},
|
2023-05-18 14:24:25 +02:00
|
|
|
'pt-BR': {
|
|
|
|
label: `Português (${translationProgress['pt-BR'] || 0}%)`,
|
|
|
|
direction: 'ltr',
|
|
|
|
htmlLang: 'pt-BR'
|
2022-05-29 19:15:01 +02:00
|
|
|
},
|
2023-05-18 14:24:25 +02:00
|
|
|
'ru-RU': {
|
2023-05-24 14:31:46 +02:00
|
|
|
label: `Pусский (${translationProgress['ru'] || 0}%)`,
|
2023-05-18 14:24:25 +02:00
|
|
|
direction: 'ltr',
|
|
|
|
htmlLang: 'ru-RU'
|
|
|
|
},
|
2023-07-25 02:32:37 +02:00
|
|
|
'tr-TR': {
|
|
|
|
label: `Türkçe (${translationProgress['tr'] || 0}%)`,
|
2023-06-03 20:45:51 +02:00
|
|
|
direction: 'ltr',
|
2023-07-25 02:32:37 +02:00
|
|
|
htmlLang: 'tr-TR'
|
2023-06-03 20:45:51 +02:00
|
|
|
},
|
2023-05-18 14:24:25 +02:00
|
|
|
'zh-Hans': {
|
|
|
|
label: `简体中文 (${translationProgress['zh-CN'] || 0}%)`,
|
|
|
|
direction: 'ltr',
|
|
|
|
htmlLang: 'zh-Hans'
|
2022-05-29 19:15:01 +02:00
|
|
|
}
|
2023-05-18 14:24:25 +02:00
|
|
|
}
|
|
|
|
},
|
2022-05-29 19:15:01 +02:00
|
|
|
|
2023-05-18 14:24:25 +02:00
|
|
|
presets: [
|
|
|
|
[
|
|
|
|
'classic',
|
|
|
|
/** @type {import('@docusaurus/preset-classic').Options} */
|
|
|
|
({
|
|
|
|
docs: {
|
|
|
|
routeBasePath: '/',
|
|
|
|
sidebarPath: require.resolve('./sidebars.js')
|
2022-05-29 19:15:01 +02:00
|
|
|
},
|
2023-05-18 14:24:25 +02:00
|
|
|
blog: false,
|
|
|
|
theme: {
|
|
|
|
customCss: [require.resolve('./src/css/custom.css')]
|
2022-07-04 16:14:20 +02:00
|
|
|
},
|
2023-05-18 14:24:25 +02:00
|
|
|
gtag: {
|
|
|
|
trackingID: 'G-4RT25NXQ7N',
|
|
|
|
anonymizeIP: true
|
2023-01-02 02:24:16 +02:00
|
|
|
},
|
2023-05-18 14:24:25 +02:00
|
|
|
sitemap: {
|
|
|
|
changefreq: 'weekly',
|
|
|
|
priority: 0.5,
|
|
|
|
ignorePatterns: ['/tags/**']
|
2022-05-29 19:15:01 +02:00
|
|
|
}
|
2023-05-18 14:24:25 +02:00
|
|
|
})
|
|
|
|
]
|
|
|
|
],
|
|
|
|
|
|
|
|
themeConfig:
|
|
|
|
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
|
|
|
({
|
|
|
|
metadata: [
|
2022-11-26 23:16:38 +02:00
|
|
|
{
|
2023-05-18 14:24:25 +02:00
|
|
|
name: 'og:image',
|
|
|
|
content: 'https://taskfile.dev/img/og-image.png'
|
2022-05-29 19:15:01 +02:00
|
|
|
}
|
2023-05-18 14:24:25 +02:00
|
|
|
],
|
|
|
|
navbar: {
|
|
|
|
title: 'Task',
|
|
|
|
logo: {
|
|
|
|
alt: 'Task Logo',
|
|
|
|
src: 'img/logo.svg'
|
|
|
|
},
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
type: 'doc',
|
|
|
|
docId: 'installation',
|
|
|
|
position: 'left',
|
|
|
|
label: 'Installation'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'doc',
|
|
|
|
docId: 'usage',
|
|
|
|
position: 'left',
|
|
|
|
label: 'Usage'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'doc',
|
|
|
|
docId: 'api_reference',
|
|
|
|
position: 'left',
|
|
|
|
label: 'API'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'doc',
|
|
|
|
docId: 'donate',
|
|
|
|
position: 'left',
|
|
|
|
label: 'Donate'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'localeDropdown',
|
|
|
|
position: 'left',
|
|
|
|
dropdownItemsAfter: [
|
|
|
|
{
|
|
|
|
to: '/translate/',
|
|
|
|
label: 'Help Us Translate'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
href: GITHUB_URL,
|
|
|
|
label: 'GitHub',
|
|
|
|
position: 'right'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
href: TWITTER_URL,
|
|
|
|
label: 'Twitter',
|
|
|
|
position: 'right'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
href: MASTODON_URL,
|
|
|
|
label: 'Mastodon',
|
|
|
|
rel: 'me',
|
|
|
|
position: 'right'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
href: DISCORD_URL,
|
|
|
|
label: 'Discord',
|
|
|
|
position: 'right'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
footer: {
|
|
|
|
style: 'dark',
|
|
|
|
links: [
|
|
|
|
{
|
|
|
|
title: 'Pages',
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
label: 'Installation',
|
|
|
|
to: '/installation/'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Usage',
|
|
|
|
to: '/usage/'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Donate',
|
|
|
|
to: '/donate/'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: 'Community',
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
label: 'GitHub',
|
|
|
|
href: GITHUB_URL
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Twitter',
|
|
|
|
href: TWITTER_URL
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Mastodon',
|
|
|
|
href: MASTODON_URL,
|
|
|
|
rel: 'me'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Discord',
|
|
|
|
href: DISCORD_URL
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'OpenCollective',
|
|
|
|
href: 'https://opencollective.com/task'
|
|
|
|
}
|
|
|
|
]
|
2023-06-11 03:49:09 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
html: '<a target="_blank" href="https://www.netlify.com"><img src="https://www.netlify.com/v3/img/components/netlify-color-accent.svg" alt="Deploys by Netlify" /></a>'
|
|
|
|
}
|
|
|
|
]
|
2023-05-18 14:24:25 +02:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
prism: {
|
|
|
|
theme: lightCodeTheme,
|
|
|
|
darkTheme: darkCodeTheme
|
|
|
|
},
|
|
|
|
// NOTE(@andreynering): Don't worry, these keys are meant to be public =)
|
|
|
|
algolia: {
|
|
|
|
appId: '7IZIJ13AI7',
|
|
|
|
apiKey: '34b64ae4fc8d9da43d9a13d9710aaddc',
|
|
|
|
indexName: 'taskfile'
|
|
|
|
}
|
|
|
|
})
|
|
|
|
};
|
|
|
|
|
|
|
|
return config;
|
2022-05-29 19:15:01 +02:00
|
|
|
};
|
|
|
|
|
2023-05-18 14:24:25 +02:00
|
|
|
module.exports = getConfig;
|