Skip to content

Commit

Permalink
configs
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickJnr committed Jun 21, 2024
1 parent ec12002 commit 2a30f65
Show file tree
Hide file tree
Showing 2 changed files with 149 additions and 35 deletions.
130 changes: 107 additions & 23 deletions gitprofile.config.ts
Original file line number Diff line number Diff line change
@@ -1,56 +1,128 @@
// gitprofile.config.js
// gitprofile.config.ts

const config = {
const CONFIG = {
github: {
username: 'patrickjnr', // Your GitHub org/user name. (Required)
sortBy: 'stars', // stars | updated
limit: 10, // How many projects to display.
exclude: {
forks: false, // Forked projects will not be displayed if set to true.
projects: [], // These projects will not be displayed. example: ['my-project1', 'my-project2']
username: 'patrickjnr', // Your GitHub org/user name. (This is the only required config)
},
/**
* If you are deploying to https://<USERNAME>.github.io/, for example your repository is at https://github.com/patrickjnr/patrickjnr.github.io, set base to '/'.
* If you are deploying to https://<USERNAME>.github.io/<REPO_NAME>/,
* for example your repository is at https://github.com/patrickjnr/portfolio, then set base to '/portfolio/'.
*/
base: '/portfolio/',
projects: {
github: {
display: true, // Display GitHub projects?
header: 'Github Projects',
mode: 'automatic', // Mode can be: 'automatic' or 'manual'
automatic: {
sortBy: 'updated', // Sort projects by 'stars' or 'updated'
limit: 8, // How many projects to display.
exclude: {
forks: false, // Forked projects will not be displayed if set to true.
projects: [], // These projects will not be displayed. example: ['patrickjnr/my-project1', 'patrickjnr/my-project2']
},
},
manual: {
// Properties for manually specifying projects
projects: ['patrickjnr/gitprofile', 'patrickjnr/pandora'], // List of repository names to display. example: ['patrickjnr/my-project1', 'patrickjnr/my-project2']
},
},
external: {
header: '',
// To hide the `External Projects` section, keep it empty.

},
},
seo: {
title: 'Portfolio of Patrick Jr.',
description: '',
imageURL: '',
},
social: {
linkedin: 'patrickjrc',
twitter: '_patrickjnr',
mastodon: 'PatrickJr@tonybark.com',
researchGate: '',
facebook: '',
instagram: '',
reddit: 'PatrickJr',
threads: '',
youtube: 'patrickjrschannel', // example: 'pewdiepie'
udemy: '',
dribbble: '',
behance: '',
medium: 'PatrickJr',
dev: 'patrickjnr',
medium: '',
dev: '',
stackoverflow: '', // example: '1/jeff-atwood'
skype: '',
telegram: '',
website: 'https://grimtech.co.uk',
phone: '',
email: 'admin@grimtech.co.uk',
},
resume: {
fileUrl:
'', // Empty fileUrl will hide the `Download Resume` button.
},
skills: [

],
experiences: [
{
},
{

},
],
certifications: [
{

// Display blog posts from your medium or dev account. (Optional)
},
],
educations: [
{

},
{

},
],
publications: [
{

},
{

},
],
// Display articles from your medium or dev account. (Optional)
blog: {
source: 'dev', // medium | dev
username: 'arifszn', // to hide blog section, keep it empty
limit: 3, // How many posts to display. Max is 10.
source: '', // medium | dev
username: '', // to hide blog section, keep it empty
limit: 2, // How many articles to display. Max is 10.
},
googleAnalytics: {
// GA3 tracking id/GA4 tag id UA-XXXXXXXXX-X | G-XXXXXXXXXX
id: 'G-J2EWZCWC7R', // Please remove this and use your own tag id or keep it empty
id: 'G-J2EWZCWC7R', // GA3 tracking id/GA4 tag id UA-XXXXXXXXX-X | G-XXXXXXXXXX
},
// Track visitor interaction and behavior. https://www.hotjar.com
hotjar: {
id: '', // Please remove this and use your own id or keep it empty
id: '',
snippetVersion: 6,
},
themeConfig: {
defaultTheme: 'Dark',
defaultTheme: 'dark',

// Hides the switch in the navbar
// Useful if you want to support a single color mode
disableSwitch: false,
disableSwitch: true,

// Should use the prefers-color-scheme media-query,
// using user system preferences, instead of the hardcoded defaultTheme
respectPrefersColorScheme: false,

// Hide the ring in Profile picture
hideAvatarRing: false,
// Display the ring in Profile picture
displayAvatarRing: true,

// Available themes. To remove any theme, exclude from here.
themes: [
Expand Down Expand Up @@ -83,10 +155,13 @@ const config = {
'night',
'coffee',
'winter',
'dim',
'nord',
'sunset',
'procyon',
],

// Custom theme
// Custom theme, applied to `procyon` theme
customTheme: {
primary: '#fc055b',
secondary: '#219aaf',
Expand All @@ -97,6 +172,15 @@ const config = {
'--rounded-btn': '3rem',
},
},

// Optional Footer. Supports plain text or HTML.
footer: `Made with <a
class="text-primary" href="https://github.com/patrickjnr/gitprofile"
target="_blank"
rel="noreferrer"
>GitProfile</a> and ❤️`,

enablePWA: true,
};

export default config;
export default CONFIG;
54 changes: 42 additions & 12 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,48 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import tailwind from 'tailwindcss';
import autoprefixer from 'autoprefixer';
import tailwindConfig from './tailwind.config.js';
import { VitePWA } from 'vite-plugin-pwa';
import CONFIG from './gitprofile.config';
import { createHtmlPlugin } from 'vite-plugin-html';

// https://vitejs.dev/config/
export default defineConfig({
// If you are deploying to https://<USERNAME>.github.io/, set base to '/'.
// If you are deploying to https://<USERNAME>.github.io/<REPO>/, for example your repository is at https://github.com/<USERNAME>/<REPO>, then set base to '/<REPO>/'.
base: '/portfolio/',
plugins: [react()],
css: {
postcss: {
plugins: [tailwind(tailwindConfig), autoprefixer],
},
base: CONFIG.base || '/',
plugins: [
react(),
createHtmlPlugin({
inject: {
data: {
metaTitle: CONFIG.seo.title,
metaDescription: CONFIG.seo.description,
metaImageURL: CONFIG.seo.imageURL,
},
},
}),
...(CONFIG.enablePWA
? [
VitePWA({
registerType: 'autoUpdate',
workbox: {
navigateFallback: undefined,
},
includeAssets: ['logo.png'],
manifest: {
name: 'Portfolio',
short_name: 'Portfolio',
description: 'Personal Portfolio',
icons: [
{
src: 'logo.png',
sizes: '64x64 32x32 24x24 16x16 192x192 512x512',
type: 'image/png',
},
],
},
}),
]
: []),
],
define: {
CONFIG: CONFIG,
},
});
});

0 comments on commit 2a30f65

Please sign in to comment.