Skip to content

Commit

Permalink
Add: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
altfoxie committed Jun 1, 2024
1 parent f4179cb commit abca6b9
Show file tree
Hide file tree
Showing 10 changed files with 166 additions and 130 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: huecker-docs
path: dist
path: dist
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm-lock.yaml
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"tabWidth": 2,
"useTabs": false
}
190 changes: 110 additions & 80 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,138 +1,168 @@
import { defineConfig } from 'vitepress'
import { defineConfig } from "vitepress";

// https://vitepress.dev/reference/site-config
export default defineConfig({
locales: {
root: {
label: 'Русский',
lang: 'ru',
label: "Русский",
lang: "ru",
title: "Хуёкер",
titleTemplate: ":title • Хуёкер",
description: "Open-source прокси для использования Docker Hub из заблокированных стран",
description:
"Open-source прокси для использования Docker Hub из заблокированных стран",
themeConfig: {
search: {
options: {
translations: {
button: {
buttonText: 'Искать',
buttonAriaLabel: 'Искать'
buttonText: "Искать",
buttonAriaLabel: "Искать",
},
modal: {
displayDetails: 'Показать детали',
resetButtonTitle: 'Сброс',
backButtonTitle: 'Назад',
noResultsText: 'Ничего не найдено по запросу',
displayDetails: "Показать детали",
resetButtonTitle: "Сброс",
backButtonTitle: "Назад",
noResultsText: "Ничего не найдено по запросу",
footer: {
selectText: 'Открыть',
selectKeyAriaLabel: 'Открыть',
navigateText: 'Навигация',
navigateUpKeyAriaLabel: 'Выше',
navigateDownKeyAriaLabel: 'Ниже',
closeText: 'Закрыть',
closeKeyAriaLabel: 'Закрыть'
}
}
}
}
selectText: "Открыть",
selectKeyAriaLabel: "Открыть",
navigateText: "Навигация",
navigateUpKeyAriaLabel: "Выше",
navigateDownKeyAriaLabel: "Ниже",
closeText: "Закрыть",
closeKeyAriaLabel: "Закрыть",
},
},
},
},
},
lastUpdated: {
text: 'Обновлено',
text: "Обновлено",
},
outline: {
label: "На этой странице",
},
docFooter: {
prev: 'Предыдущая страница',
next: 'Следующая страница'
prev: "Предыдущая страница",
next: "Следующая страница",
},
darkModeSwitchLabel: 'Тема',
lightModeSwitchTitle: 'Переключиться на светлую тему',
darkModeSwitchTitle: 'Переключиться на тёмную тему',
sidebarMenuLabel: 'Меню',
returnToTopLabel: 'Наверх',
langMenuLabel: 'Сменить язык',
darkModeSwitchLabel: "Тема",
lightModeSwitchTitle: "Переключиться на светлую тему",
darkModeSwitchTitle: "Переключиться на тёмную тему",
sidebarMenuLabel: "Меню",
returnToTopLabel: "Наверх",
langMenuLabel: "Сменить язык",
nav: [
{text: 'Зачем', link: '/reasons'},
{text: 'Как использовать', link: '/use'},
{text: 'Поддержать', link: '/support'},
{text: 'Авторы', link: '/authors'}
{ text: "Зачем", link: "/reasons" },
{ text: "Как использовать", link: "/use" },
{ text: "Поддержать", link: "/support" },
{ text: "Авторы", link: "/authors" },
],
sidebar: [
{
text: 'Документация',
text: "Документация",
items: [
{text: 'Зачем', link: '/reasons'},
{text: 'Использование', link: '/use'},
{text: 'Другие прокси', link: '/others'},
{text: 'Поддержать', link: '/support'},
{text: 'Авторы', link: '/authors'},
]
}
{ text: "Зачем", link: "/reasons" },
{ text: "Использование", link: "/use" },
{ text: "Другие прокси", link: "/others" },
{ text: "Поддержать", link: "/support" },
{ text: "Авторы", link: "/authors" },
],
},
],
footer: {
message: 'Опубликовано под лицензией Apache-2.0, сервер: dev',
copyright: 'Создано <a href="https://github.com/altfoxie" target="_blank">@altfoxie</a>, сайт и лого <a href="https://github.com/glebgorokhov" target="_blank">@glebgorokhov</a>'
message: "Опубликовано под лицензией Apache-2.0, сервер: dev",
copyright:
'Создано <a href="https://github.com/altfoxie" target="_blank">@altfoxie</a>, сайт и лого <a href="https://github.com/glebgorokhov" target="_blank">@glebgorokhov</a>',
},
}
},
},
en: {
label: 'English',
lang: 'en',
label: "English",
lang: "en",
title: "Huecker",
titleTemplate: ":title • Huecker",
description: "Open-source proxy for using Docker Hub from blocked countries",
description:
"Open-source proxy for using Docker Hub from blocked countries",
themeConfig: {
nav: [
{text: 'Reasons', link: '/en/reasons'},
{text: 'How to Use', link: '/en/use'},
{text: 'Support', link: '/en/support'},
{text: 'Authors', link: '/en/authors'}
{ text: "Reasons", link: "/en/reasons" },
{ text: "How to Use", link: "/en/use" },
{ text: "Support", link: "/en/support" },
{ text: "Authors", link: "/en/authors" },
],
sidebar: [
{
text: 'Documentation',
text: "Documentation",
items: [
{text: 'Reasons', link: '/en/reasons'},
{text: 'How to Use', link: '/en/use'},
{text: 'Other Proxies', link: '/en/others'},
{text: 'Support', link: '/en/support'},
{text: 'Authors', link: '/en/authors'},
]
}
{ text: "Reasons", link: "/en/reasons" },
{ text: "How to Use", link: "/en/use" },
{ text: "Other Proxies", link: "/en/others" },
{ text: "Support", link: "/en/support" },
{ text: "Authors", link: "/en/authors" },
],
},
],
footer: {
message: 'Published under Apache-2.0 license, server: dev',
copyright: 'Created by <a href="https://github.com/altfoxie" target="_blank">@altfoxie</a>, site and logo <a href="https://github.com/glebgorokhov" target="_blank">@glebgorokhov</a>'
message: "Published under Apache-2.0 license, server: dev",
copyright:
'Created by <a href="https://github.com/altfoxie" target="_blank">@altfoxie</a>, site and logo <a href="https://github.com/glebgorokhov" target="_blank">@glebgorokhov</a>',
},
}
}
},
},
},
head: [
['link', { rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' }],
['link', { rel: 'icon', type: 'image/png', sizes: '32x32', href: '/favicon-32x32.png' }],
['link', { rel: 'icon', type: 'image/png', sizes: '16x16', href: '/favicon-16x16.png' }],
['link', { rel: 'manifest', href: '/site.webmanifest' }],
['link', { rel: 'mask-icon', href: '/safari-pinned-tab.svg', color: '#1d63ed' }],
['link', { rel: 'icon', href: '/favicon.ico' }],
['meta', { name: 'msapplication-TileColor', content: '#1d63ed' }],
['meta', { name: 'theme-color', content: '#ffffff' }],
[
"link",
{
rel: "apple-touch-icon",
sizes: "180x180",
href: "/apple-touch-icon.png",
},
],
[
"link",
{
rel: "icon",
type: "image/png",
sizes: "32x32",
href: "/favicon-32x32.png",
},
],
[
"link",
{
rel: "icon",
type: "image/png",
sizes: "16x16",
href: "/favicon-16x16.png",
},
],
["link", { rel: "manifest", href: "/site.webmanifest" }],
[
"link",
{ rel: "mask-icon", href: "/safari-pinned-tab.svg", color: "#1d63ed" },
],
["link", { rel: "icon", href: "/favicon.ico" }],
["meta", { name: "msapplication-TileColor", content: "#1d63ed" }],
["meta", { name: "theme-color", content: "#ffffff" }],
],
srcDir: './src',
outDir: './dist',
appearance: 'dark',
srcDir: "./src",
outDir: "./dist",
appearance: "dark",
lastUpdated: true,
themeConfig: {
siteTitle: false,
search: {
provider: 'local',
provider: "local",
detailedView: true,
},
logo: {
light: "/logo_light.svg",
dark: "/logo_dark.svg",
},
socialLinks: [
{ icon: 'github', link: 'https://github.com/huecker-io/huecker' }
]
}
})
{ icon: "github", link: "https://github.com/huecker-io/huecker" },
],
},
});
14 changes: 7 additions & 7 deletions .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// https://vitepress.dev/guide/custom-theme
import { h } from 'vue'
import type { Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import './style.css'
import { h } from "vue";
import type { Theme } from "vitepress";
import DefaultTheme from "vitepress/theme";
import "./style.css";

export default {
extends: DefaultTheme,
Layout: () => {
return h(DefaultTheme.Layout, null, {
// https://vitepress.dev/guide/extending-default-theme#layout-slots
})
});
},
enhanceApp({ app, router, siteData }) {
// ...
}
} satisfies Theme
},
} satisfies Theme;
31 changes: 15 additions & 16 deletions .vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,20 @@
* in custom container, badges, etc.
* -------------------------------------------------------------------------- */
:root {
--vp-c-docker-1: #1D63ED;
--vp-c-docker-2: #2e74ff;
--vp-c-docker-3: #1D63ED;
--vp-c-docker-soft: rgba(29, 99, 237, 0.14);
--vp-c-docker-1: #1d63ed;
--vp-c-docker-2: #2e74ff;
--vp-c-docker-3: #1d63ed;
--vp-c-docker-soft: rgba(29, 99, 237, 0.14);
}

.dark {
--vp-c-docker-1: #31b0ff;
--vp-c-docker-2: #2e74ff;
--vp-c-docker-3: #1D63ED;
--vp-c-docker-soft: rgba(29, 99, 237, 0.16);
--vp-c-docker-1: #31b0ff;
--vp-c-docker-2: #2e74ff;
--vp-c-docker-3: #1d63ed;
--vp-c-docker-soft: rgba(29, 99, 237, 0.16);
}

:root {
:root {
--vp-c-default-1: var(--vp-c-gray-1);
--vp-c-default-2: var(--vp-c-gray-2);
--vp-c-default-3: var(--vp-c-gray-3);
Expand Down Expand Up @@ -107,12 +107,12 @@
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: var(--vp-c-brand-1);

--vp-home-hero-image-background-image: linear-gradient(
-45deg,
rgba(20, 119, 232, 0.2) 50%,
rgba(36, 237, 255, 0.2) 50%
);
--vp-home-hero-image-filter: blur(44px);
--vp-home-hero-image-background-image: linear-gradient(
-45deg,
rgba(20, 119, 232, 0.2) 50%,
rgba(36, 237, 255, 0.2) 50%
);
--vp-home-hero-image-filter: blur(44px);
}

@media (min-width: 640px) {
Expand Down Expand Up @@ -145,4 +145,3 @@
.DocSearch {
--docsearch-primary-color: var(--vp-c-brand-1) !important;
}

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
"scripts": {
"docs:dev": "vitepress dev",
"docs:build": "vitepress build",
"docs:preview": "vitepress preview"
"docs:preview": "vitepress preview",
"docs:format": "prettier --write ."
},
"dependencies": {
"vitepress": "^1.2.2",
"vue": "^3.4.27"
},
"devDependencies": {
"prettier": "^3.2.5"
},
"packageManager": "[email protected]"
}
7 changes: 3 additions & 4 deletions src/en/use.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Located at:

| Operating System | Path to configuration file |
|----------------------|----------------------------------------------|
| -------------------- | -------------------------------------------- |
| Linux, regular setup | /etc/docker/daemon.json |
| Linux, rootless mode | ~/.config/docker/daemon.json |
| macOS | ~/.docker/daemon.json |
Expand All @@ -16,8 +16,8 @@ Located at:
Config:

```json
{
"registry-mirrors": ["https:\/\/huecker.io"]
{
"registry-mirrors": ["https://huecker.io"]
}
```

Expand All @@ -29,7 +29,6 @@ $ systemctl restart docker

Now when trying to download an image, docker will try to use the proxy first


## 2. Explicitly specifying the address

```bash
Expand Down
Loading

0 comments on commit abca6b9

Please sign in to comment.