Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: admin-doc to hasura docs style #3087

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exclude this file. It is used by many other contributors and will cause our workflow to fail. See commands to use below. DO NOT DELETE THE FILE.

git add -u
git reset HEAD path/to/file
git commit
git push


npm run format:fix

Check warning on line 1 in .husky/pre-commit

View workflow job for this annotation

GitHub Actions / Performs linting, formatting, type-checking, checking for different source and target branch

File ignored by default.
# npm run lint:fix
npm run lint-staged
npm run typecheck
Expand Down
35 changes: 35 additions & 0 deletions config/vite.config.ts.timestamp-1735476518176-eac443967cb4b.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// config/vite.config.ts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exclude this file. See commands to use below. DO NOT DELETE THE FILE.

git add -u
git reset HEAD path/to/file
git commit
git push

This PR was successful without adding adding it.

import { defineConfig } from "file:///C:/Users/reesh/Desktop/talawa-admin/node_modules/vite/dist/node/index.js";

Check failure on line 2 in config/vite.config.ts.timestamp-1735476518176-eac443967cb4b.mjs

View workflow job for this annotation

GitHub Actions / Performs linting, formatting, type-checking, checking for different source and target branch

Replace `"file:///C:/Users/reesh/Desktop/talawa-admin/node_modules/vite/dist/node/index.js"` with `'file:///C:/Users/reesh/Desktop/talawa-admin/node_modules/vite/dist/node/index.js'`
import react from "file:///C:/Users/reesh/Desktop/talawa-admin/node_modules/@vitejs/plugin-react/dist/index.mjs";

Check failure on line 3 in config/vite.config.ts.timestamp-1735476518176-eac443967cb4b.mjs

View workflow job for this annotation

GitHub Actions / Performs linting, formatting, type-checking, checking for different source and target branch

Replace `"file:///C:/Users/reesh/Desktop/talawa-admin/node_modules/@vitejs/plugin-react/dist/index.mjs"` with `'file:///C:/Users/reesh/Desktop/talawa-admin/node_modules/@vitejs/plugin-react/dist/index.mjs'`
import viteTsconfigPaths from "file:///C:/Users/reesh/Desktop/talawa-admin/node_modules/vite-tsconfig-paths/dist/index.js";

Check failure on line 4 in config/vite.config.ts.timestamp-1735476518176-eac443967cb4b.mjs

View workflow job for this annotation

GitHub Actions / Performs linting, formatting, type-checking, checking for different source and target branch

Replace `"file:///C:/Users/reesh/Desktop/talawa-admin/node_modules/vite-tsconfig-paths/dist/index.js"` with `'file:///C:/Users/reesh/Desktop/talawa-admin/node_modules/vite-tsconfig-paths/dist/index.js'`
import svgrPlugin from "file:///C:/Users/reesh/Desktop/talawa-admin/node_modules/vite-plugin-svgr/dist/index.js";

Check failure on line 5 in config/vite.config.ts.timestamp-1735476518176-eac443967cb4b.mjs

View workflow job for this annotation

GitHub Actions / Performs linting, formatting, type-checking, checking for different source and target branch

Replace `"file:///C:/Users/reesh/Desktop/talawa-admin/node_modules/vite-plugin-svgr/dist/index.js"` with `'file:///C:/Users/reesh/Desktop/talawa-admin/node_modules/vite-plugin-svgr/dist/index.js'`
import EnvironmentPlugin from "file:///C:/Users/reesh/Desktop/talawa-admin/node_modules/vite-plugin-environment/dist/index.js";

Check failure on line 6 in config/vite.config.ts.timestamp-1735476518176-eac443967cb4b.mjs

View workflow job for this annotation

GitHub Actions / Performs linting, formatting, type-checking, checking for different source and target branch

Replace `"file:///C:/Users/reesh/Desktop/talawa-admin/node_modules/vite-plugin-environment/dist/index.js"` with `'file:///C:/Users/reesh/Desktop/talawa-admin/node_modules/vite-plugin-environment/dist/index.js'`
var vite_config_default = defineConfig({
// depending on your application, base can also be "/"
build: {
outDir: "build"

Check failure on line 10 in config/vite.config.ts.timestamp-1735476518176-eac443967cb4b.mjs

View workflow job for this annotation

GitHub Actions / Performs linting, formatting, type-checking, checking for different source and target branch

Replace `"build"` with `'build',`
},
base: "",

Check failure on line 12 in config/vite.config.ts.timestamp-1735476518176-eac443967cb4b.mjs

View workflow job for this annotation

GitHub Actions / Performs linting, formatting, type-checking, checking for different source and target branch

Replace `""` with `''`
plugins: [
react(),
viteTsconfigPaths(),
EnvironmentPlugin("all"),

Check failure on line 16 in config/vite.config.ts.timestamp-1735476518176-eac443967cb4b.mjs

View workflow job for this annotation

GitHub Actions / Performs linting, formatting, type-checking, checking for different source and target branch

Replace `"all"` with `'all'`
svgrPlugin({
svgrOptions: {
icon: true

Check failure on line 19 in config/vite.config.ts.timestamp-1735476518176-eac443967cb4b.mjs

View workflow job for this annotation

GitHub Actions / Performs linting, formatting, type-checking, checking for different source and target branch

Insert `,`
// ...svgr options (https://react-svgr.com/docs/options/)
}

Check failure on line 21 in config/vite.config.ts.timestamp-1735476518176-eac443967cb4b.mjs

View workflow job for this annotation

GitHub Actions / Performs linting, formatting, type-checking, checking for different source and target branch

Insert `,`
})
],
server: {
// this ensures that the browser opens upon server start
open: false,
host: "0.0.0.0",
// this sets a default port to 4321
port: 4321
}
});
export {
vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiY29uZmlnL3ZpdGUuY29uZmlnLnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZGlybmFtZSA9IFwiQzpcXFxcVXNlcnNcXFxccmVlc2hcXFxcRGVza3RvcFxcXFx0YWxhd2EtYWRtaW5cXFxcY29uZmlnXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ZpbGVuYW1lID0gXCJDOlxcXFxVc2Vyc1xcXFxyZWVza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pXHJcbiAgICAgIH0sXHJcbiAgICB9KSxcclxuICBdLFxyXG4gIHNlcnZlcjoge1xyXG4gICAgLy8gdGhpcyBlbnN1cmVzIHRoYXQgdGhlIGJyb3dzZXIgb3BlbnMgdXBvbiBzZXJ2ZXIgc3RhcnRcclxuICAgIG9wZW46IGZhbHNlLFxyXG4gICAgaG9zdDogJzAuMC4wLjAnLFxyXG4gICAgLy8gdGhpcyBzZXRzIGEgZGVmYXVsdCBwb3J0IHRvIDQzMjFcclxuICAgIHBvcnQ6IDQzMjEsXHJcbiAgfSxcclxufSk7XHJcbiJdLAogICJtYXBwaW5ncyI6ICI7QUFBNFQsU0FBUyxvQkFBb0I7QUFDelYsT0FBTyxXQUFXO0FBQ2xCLE9BQU8sdUJBQXVCO0FBQzlCLE9BQU8sZ0JBQWdCO0FBQ3ZCLE9BQU8sdUJBQXVCO0FBRTlCLElBQU8sc0JBQVEsYUFBYTtBQUFBO0FBQUEsRUFFMUIsT0FBTztBQUFBLElBQ0wsUUFBUTtBQUFBLEVBQ1Y7QUFBQSxFQUNBLE1BQU07QUFBQSxFQUNOLFNBQVM7QUFBQSxJQUNQLE1BQU07QUFBQSxJQUNOLGtCQUFrQjtBQUFBLElBQ2xCLGtCQUFrQixLQUFLO0FBQUEsSUFDdkIsV0FBVztBQUFBLE1BQ1QsYUFBYTtBQUFBLFFBQ1gsTUFBTTtBQUFBO0FBQUEsTUFFUjtBQUFBLElBQ0YsQ0FBQztBQUFBLEVBQ0g7QUFBQSxFQUNBLFFBQVE7QUFBQTtBQUFBLElBRU4sTUFBTTtBQUFBLElBQ04sTUFBTTtBQUFBO0FBQUEsSUFFTixNQUFNO0FBQUEsRUFDUjtBQUNGLENBQUM7IiwKICAibmFtZXMiOiBbXQp9Cg==
147 changes: 116 additions & 31 deletions docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import type * as Preset from '@docusaurus/preset-classic';

const config: Config = {
title: 'Talawa-Admin Documentation',
tagline: 'Start your open source journey here',
favicon: 'img/favicon.ico',
tagline: 'Complete guides and references for building with Talawa',
favicon: 'img/favicon_palisadoes.ico',

url: 'https://docs-admin.talawa.io',
baseUrl: '/',
Expand All @@ -30,90 +30,175 @@ const config: Config = {
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
{
docs: {
sidebarPath: './sidebars.ts',
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
sidebarPath: require.resolve('./sidebars.ts'),
editUrl: ({ docPath }) => {
return `https://github.com/PalisadoesFoundation/talawa-docs/edit/develop/docs/${docPath}`;
},
},
blog: {
showReadingTime: true,
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
'https://github.com/PalisadoesFoundation/talawa-docs/tree/develop/docs',
},
theme: {
customCss: './src/css/custom.css',
customCss: [
require.resolve('./src/css/custom.css'),
require.resolve('./src/css/index.css'),
],
},
} satisfies Preset.Options,
},
],
],

themeConfig: {
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
docs: {
sidebar: {
hideable: false,
},
},
navbar: {
title: 'My Site',
title: 'Talawa-docs',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to Talawa Admin Documentation

logo: {
alt: 'My Site Logo',
src: 'img/logo.svg',
alt: 'Talawa Logo',
src: 'img/favicon_palisadoes.ico',
className: 'LogoAnimation',
},
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
to: 'docs/',
activeBasePath: 'docs',
position: 'left',
label: 'General',
},
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
to: 'docs/',
activeBasePath: 'docs',
label: 'Web Guide',
position: 'left',
label: 'Tutorial',
},
{
href: 'https://github.com/facebook/docusaurus',
label: 'GitHub',
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
to: 'docs/',
activeBasePath: 'docs',
label: 'Admin Guide',
position: 'left',
},
{
to: 'docs/',
activeBasePath: 'docs',
label: 'API',
position: 'left',
items: [
{
label: 'General',
to: 'docs/',
activeBasePath: 'docs',
},
{
label: 'Talawa API',
to: 'docs/talawa-api-docs/modules',
activeBasePath: 'docs',
},
{
label: 'Talawa Flutter Docs',
to: 'docs/talawa-mobile-docs',
activeBasePath: 'docs',
},
{
label: 'Talawa Admin',
to: 'docs/talawa-admin-docs/modules',
activeBasePath: 'docs',
},
],
},
{
to: 'https://github.com/PalisadoesFoundation',
position: 'right',
className: 'header-github-link',
'aria-label': 'GitHub repository',
},
{
to: 'https://www.youtube.com/@PalisadoesOrganization',
position: 'right',
className: 'header-youtube-link',
'aria-label': 'Palisadoes Youtube channel',
},
],
},
colorMode: {
defaultMode: 'light',
disableSwitch: false,
respectPrefersColorScheme: false,
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
title: 'Community',
items: [
{
label: 'Tutorial',
to: '/docs/intro',
label: ' Slack',
to: 'https://github.com/PalisadoesFoundation',
className: 'footer__icon footer__slack',
},
{
label: ' News',
to: 'https://www.palisadoes.org/news/',
className: 'footer__icon footer__news',
},
{
label: ' Contact Us',
to: 'https://www.palisadoes.org/contact/',
className: 'footer__icon footer__contact',
},
],
},
{
title: 'Community',
title: 'Social Media',
items: [
{
label: 'Stack Overflow',
href: 'https://stackoverflow.com/questions/tagged/docusaurus',
label: ' Twitter',
to: 'https://twitter.com/palisadoesorg?lang=en',
className: 'footer__icon footer__twitter',
},
{
label: 'Discord',
href: 'https://discordapp.com/invite/docusaurus',
label: ' Facebook',
to: 'https://www.facebook.com/palisadoesproject/',
className: 'footer__icon footer__facebook',
},
{
label: 'X',
href: 'https://x.com/docusaurus',
label: ' Instagram',
to: 'https://www.instagram.com/palisadoes/?hl=en',
className: 'footer__icon footer__instagram',
},
],
},
{
title: 'More',
title: 'Development',
items: [
{
label: 'GitHub',
href: 'https://github.com/facebook/docusaurus',
label: ' GitHub',
to: 'https://github.com/PalisadoesFoundation',
className: 'footer__icon footer__github',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
copyright: `Copyright © ${new Date().getFullYear()} The Palisadoes Foundation, LLC. Built with Docusaurus.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
} satisfies Preset.ThemeConfig,
},
};

export default config;
Loading
Loading