portosaurus 1.16.8 → 1.16.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "portosaurus",
3
- "version": "1.16.8",
3
+ "version": "1.16.9",
4
4
  "author": "soymadip",
5
5
  "license": "GPL-3.0-only",
6
6
  "description": "Complete portfolio cum personal website solution for your digital personality.",
@@ -6,13 +6,14 @@ export default function HeroSection({ id, className }) {
6
6
  const { siteConfig } = useDocusaurusContext();
7
7
  const { customFields } = siteConfig;
8
8
 
9
- const intro = customFields.heroSection.intro;
10
- const title = customFields.heroSection.title;
11
- const subtitle = customFields.heroSection.subtitle;
12
- const profession = customFields.heroSection.profession;
13
- const description = customFields.heroSection.description;
14
- const profilePic = customFields.heroSection.profilePic;
15
- const learnMoreButtonText = customFields.heroSection.learnMoreButtonTxt;
9
+ const hero = customFields?.heroSection || {};
10
+ const intro = hero.intro || "";
11
+ const title = hero.title || "";
12
+ const subtitle = hero.subtitle || "";
13
+ const profession = hero.profession || "";
14
+ const description = hero.description || "";
15
+ const profilePic = hero.profilePic || "";
16
+ const learnMoreButtonText = hero.learnMoreButtonTxt || "Learn More";
16
17
 
17
18
  return (
18
19
  <div
@@ -20,7 +20,7 @@ export default function SocialIcons({ showAll = false }) {
20
20
 
21
21
  const [animationDelays, setAnimationDelays] = useState({});
22
22
 
23
- const allSocialLinks = customFields.socialLinks.links || [];
23
+ const allSocialLinks = customFields?.socialLinks?.links || [];
24
24
 
25
25
  // FIX: `to prevent unnecessary recalculations`
26
26
  const socialLinks = useMemo(() => {
@@ -66,7 +66,7 @@ export function createDocuConf(userConfig, projectRoot = process.cwd()) {
66
66
  usrConf.hero_section?.description ||
67
67
  "Complete portfolio cum personal website solution for your digital personality.";
68
68
  const projIcon =
69
- usrConf.hero_section.profile_pic ||
69
+ usrConf.hero_section?.profile_pic ||
70
70
  "https://raw.githubusercontent.com/soymadip/portosaurus/refs/heads/compiler/static/img/icon.png";
71
71
 
72
72
  // Ensure defaults if missing