Skip to content
Draft
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
37 changes: 37 additions & 0 deletions .env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# https://docs.astro.build/en/guides/environment-variables/
# all environment variables are available in server-side code
# but only those prefixed with PUBLIC_ are available in client-side code
# for security purposes

# @TODO deployment variables
PUBLIC_APP_ENV=local
PUBLIC_APP_DEBUG=true
PUBLIC_APP_URL_LOCAL=http://localhost:4321

# package settings
ESLINT_USE_FLAT_CONFIG=true

# @TODO 3rd party API: email variables

# @TODO 3rd party API: sentry variables

# @TODO 3rd party API: authentication variables
OAUTH_GOOGLE_CALLBACK_URL=https://nisqbnccwxzdcnygmvny.supabase.co/auth/v1/callback

# @TODO 3rd party API: CAPTCHAs

# @TODO 3rd party API: database variables
PUBLIC_SUPABASE_REFERENCE=nisqbnccwxzdcnygmvny
PUBLIC_DB_HOST=db.nisqbnccwxzdcnygmvny.supabase.co
PUBLIC_DB_NAME=postgres
PUBLIC_DB_PORT=5432
PUBLIC_DB_USER=postgres
PUBLIC_DB_URL=postgresql://postgres:[SUPABASE_PASS]@db.nisqbnccwxzdcnygmvny.supabase.co:5432/postgres
PUBLIC_SUPABASE_URL=https://nisqbnccwxzdcnygmvny.supabase.co
PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im5pc3FibmNjd3h6ZGNueWdtdm55Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTk4ODEyMDksImV4cCI6MjAxNTQ1NzIwOX0.pByv8CYbKst_Gz-Rf3T6iGlnFQycYXsTO1gpiaTi-kk

# @TODO 3rd party API: search (Algolia) variables

# @TODO 3rd party API: analytics variables
CLARITY_ID=jf58s4ogm4
PIWIK_ID=58e572c6-9a42-4d78-bd6b-a32298c53f08
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pnpm-debug.log*

# environment variables
.env
.env.local
#.env.local
.env.development
.env.production

Expand Down
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"editor.formatOnPaste": true,
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.markdownlint": true,
"source.fixAll.eslint": true
"source.fixAll.markdownlint": "explicit",
"source.fixAll.eslint": "explicit"
},
"files.eol": "\n",
"typescript.tsdk": "node_modules/typescript/lib",
Expand Down
36 changes: 0 additions & 36 deletions _old_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -1967,10 +1967,6 @@
"url": "https://leanweb.dev/talk/",
"title": "this video"
},
{
"url": "https://resilientwebdesign.com/",
"title": "Resilient web design"
},
{
"url": "https://briefs.video/videos/is-progressive-enhancement-dead-yet/",
"title": "This video"
Expand Down Expand Up @@ -6539,38 +6535,6 @@
"url": "https://www.youtube.com/watch?v=jgQjes7MgTM",
"title": "The BEST Coding Interview Roadmap in 2023 (free)"
},
{
"title": "Resilient Web Design",
"slug": "resilient-web-design",
"url": "https://resilientwebdesign.com/",
"language": "en",
"pubDate": "05 October 2011 14:48 UTC",
"addDate": "05 October 2011 14:48 UTC",
"description": "Una din cele mai bune cărți care descrie evoluția și progresul web development-ului de-a lungul anilor, și în care sunt explicate concepte de bază de la...",
"author": "Jeremy Keith",
"authorUrl": "https://adactio.com/",
"section": "Front End",
"category": "Introducere",
"rating": 100,
"price": 0,
"requiredTime": 20,
"type": "carte",
"mandatory": true,
"image": {
"imageUrl": "https://docs.astro.build/assets/full-logo-light.png",
"imageAlt": "Prima pagină din Resilient Web Design"
},
"tags": [
"carte",
"title",
"free",
"începători",
"mid",
"avansați",
"pro",
"obligatoriu"
]
},
{
"url": "https://uxhints.com/",
"title": "https://uxhints.com/"
Expand Down
84 changes: 46 additions & 38 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,43 +1,48 @@
import { ENV, LANGUAGE_EXTENDED, SITE_DESCRIPTION, SITE_NAME, ACCENT_COLOR, URL, DEBUG } from './src/config';
import { defineConfig } from 'astro/config';
import { fileURLToPath } from 'url';
import compress from 'astro-compress';
import mdx from '@astrojs/mdx';
// import compress from 'astro-compress';
// import mdx from '@astrojs/mdx';
import path from 'path';
import prefetch from '@astrojs/prefetch';
import partytown from '@astrojs/partytown';
import sitemap from '@astrojs/sitemap';
import webmanifest from 'astro-webmanifest';

import vercel from '@astrojs/vercel/serverless';
const __dirname = path.dirname(fileURLToPath(import.meta.url));


// https://astro.build/config
export default defineConfig({
site: URL || 'https://resurse.dev',
output: 'static',
output: 'hybrid',
compressHTML: ENV !== 'local' && ENV !== 'development' ? true : false,
prefetch: {
defaultStrategy: 'viewport'
},
redirects: {
// '/old': '/new',
},
image: {
remotePatterns: [{ protocol: 'https' }],
remotePatterns: [{
protocol: 'https'
}]
},
vite: {
logLevel: DEBUG ? 'info' : 'silent',
define: {
__DATE__: `'${new Date().toISOString()}'`,
__DATE__: `'${new Date().toISOString()}'`
},
resolve: {
alias: {
'~': path.resolve(__dirname, './src'),
},
},
'~': path.resolve(__dirname, './src')
}
}
},
markdown: {
syntaxHighlight: 'shiki',
remarkRehype: {
footnoteLabel: 'Note de subsol',
footnoteBackLabel: 'Înapoi la conținut',
footnoteBackLabel: 'Înapoi la conținut'
},
shikiConfig: {
// Choose from Shiki's built-in themes (or add your own)
Expand All @@ -46,16 +51,19 @@ export default defineConfig({
// Add custom languages
// Note: Shiki has countless langs built-in, including .astro!
// https://github.com/shikijs/shiki/blob/main/docs/languages.md
langs: [],
// import customLang from './custom.tmLanguage.json'
langs: [
// customLang,
],
// Enable word wrap to prevent horizontal scrolling
wrap: true,
},
wrap: true
}
},
i18n: {
defaultLocale: 'ro',
locales: ['ro'],
},
integrations: [
prefetch({
// Only prefetch links with an href that begins with `/resurse` or `.front-end`
intentSelector: ["a[href^='/resurse']"],
}),
webmanifest({
name: SITE_NAME,
short_name: SITE_NAME,
Expand All @@ -70,49 +78,49 @@ export default defineConfig({
config: {
outfile: 'site.webmanifest',
createFavicon: true,
insertFaviconLinks: true, // default - true
insertThemeColorMeta: false, // default - true
insertManifestLink: true, // default - true
insertFaviconLinks: true,
insertThemeColorMeta: false,
insertManifestLink: true,
crossOrigin: 'anonymous',
insertAppleTouchLinks: true,
iconPurpose: ['badge', 'maskable', 'monochrome'],
},
iconPurpose: ['badge', 'maskable', 'monochrome']
}
}),
partytown({
config: {
debug: true,
forward: ['dataLayer.push'],
},
forward: ['dataLayer.push']
}
}),
sitemap({
customPages: ['https://resurse.dev/external-page2'],
filter: (page) =>
page !== 'https://resurse.dev/secret-vip-lounge-1/' &&
page !== 'https://resurse.dev/secret-vip-lounge-2/' &&
page !== 'https://resurse.dev/secret-vip-lounge-3/' &&
page !== 'https://resurse.dev/secret-vip-lounge-4/',
filter: page => {
return page !== 'https://resurse.dev/dashboard/' && page !== 'https://resurse.dev/secret-vip-lounge-2/';
},
entryLimit: 10000,
changefreq: 'weekly',
priority: 0.7,
//lastmod: new Date(GLOBAL_PUB_DATE),
i18n: {
defaultLocale: 'ro',
locales: {
ro: 'ro-RO',
en: 'en-US',
},
},
ro: 'ro-RO'
}
}
}),
/*
mdx(),
compress({
CSS: true,
HTML: {
removeAttributeQuotes: false,
removeAttributeQuotes: false
},
Image: false,
JavaScript: true,
SVG: true,
Logger: 1,
}),
Logger: 1
})
*/
],
});
adapter: vercel()
});
17 changes: 17 additions & 0 deletions digital-resources.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"folders": [
{
"name": "project-root",
"path": "./"
},
{
"name": "supabase-functions",
"path": "supabase/functions"
}
],
"settings": {
"files.exclude": {
"supabase/functions/": true
}
}
}
54 changes: 30 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@
"url": "https://github.com/ViorelMocanu/digital-resources"
},
"homepage": "https://resurse.dev",
"browserslist": [
"defaults"
],
"engineStrict": true,
"engines": {
"node": ">=18.15",
"pnpm": ">=8"
"node": ">=18.0.0",
"pnpm": ">=8.0.0"
},
"license": "ISC",
"keywords": [
Expand Down Expand Up @@ -41,43 +45,45 @@
"lint": "pnpm lint:js . && pnpm lint:md",
"postinstall": "husky install",
"coverage": "pnpm test:unit --coverage",
"typegen:astro": "astro sync",
"typegen:supabase": "pnpm supabase gen types typescript --project-id \"$PUBLIC_SUPABASE_REFERENCE\" --schema public > src/types/supabase.ts --debug",
"test:unit": "vitest run",
"test:e2e": "playwright test",
"test": "pnpm test:unit && pnpm test:e2e",
"typecheck": "pnpm astro check && pnpm tsc --project tsconfig.json",
"upd": "pnpm up --latest --interactive && pnpm update",
"verify": "pnpm lint && pnpm typecheck && pnpm test:unit && pnpm format",
"verify:fix": "pnpm lint:fix && pnpm typecheck && pnpm test:unit && pnpm format:fix"
},
"dependencies": {
"@astrojs/check": "^0.3.1",
"@astrojs/check": "0.3.3",
"@astrojs/partytown": "2.0.2",
"@astrojs/prefetch": "0.4.1",
"@astrojs/rss": "3.0.0",
"@astrojs/sitemap": "3.0.3",
"astro": "3.4.4",
"astro-compress": "2.1.6",
"astro-simpleanalytics-plugin": "0.3.5",
"@astrojs/vercel": "6.1.0",
"@supabase/supabase-js": "2.39.0",
"astro": "4.0.6",
"astro-simpleanalytics-plugin": "0.3.6",
"astro-webmanifest": "1.0.0",
"lite-youtube-embed": "0.3.0",
"sass": "1.69.5",
"sharp": "0.32.6"
"sharp": "0.33.1"
},
"devDependencies": {
"@astrojs/mdx": "1.1.3",
"@commitlint/cli": "18.2.0",
"@commitlint/config-conventional": "18.1.0",
"@typescript-eslint/eslint-plugin": "6.10.0",
"@typescript-eslint/parser": "6.10.0",
"@vitest/coverage-v8": "0.34.6",
"eslint": "8.53.0",
"eslint-plugin-astro": "0.29.1",
"eslint-plugin-jsdoc": "46.8.2",
"@commitlint/cli": "18.4.3",
"@commitlint/config-conventional": "18.4.3",
"@typescript-eslint/eslint-plugin": "6.15.0",
"@typescript-eslint/parser": "6.15.0",
"@vitest/coverage-v8": "1.0.4",
"eslint": "8.56.0",
"eslint-plugin-astro": "0.31.0",
"eslint-plugin-jsdoc": "46.9.1",
"eslint-plugin-jsx-a11y": "6.8.0",
"husky": "8.0.3",
"markdownlint-cli": "0.37.0",
"prettier": "3.0.3",
"prettier-plugin-astro": "0.12.1",
"typescript": "5.2.2",
"vitest": "0.34.6"
"markdownlint-cli": "0.38.0",
"prettier": "3.1.1",
"prettier-plugin-astro": "0.12.2",
"sass": "1.69.5",
"supabase": "1.123.4",
"typescript": "5.3.3",
"vitest": "1.0.4"
}
}
Loading