Gatsby Theme Intro 项目教程

Gatsby Theme Intro 项目教程

gatsby-theme-intro Personal branding theme for developers gatsby-theme-intro 项目地址: https://gitcode.com/gh_mirrors/ga/gatsby-theme-intro

1. 项目的目录结构及介绍

gatsby-theme-intro/
├── content/
│   ├── profile.yaml
│   ├── projects.yaml
│   └── work-history.yaml
├── src/
│   ├── components/
│   └── types/
├── gatsby-config.js
├── package.json
├── README.md
├── LICENSE
└── yarn.lock

目录结构介绍

  • content/: 包含项目的配置文件,用于定义个人资料、项目和职业历史。

    • profile.yaml: 个人资料配置文件。
    • projects.yaml: 项目配置文件。
    • work-history.yaml: 职业历史配置文件。
  • src/: 包含项目的源代码。

    • components/: 存放项目的React组件。
    • types/: 存放项目的类型定义文件。
  • gatsby-config.js: Gatsby项目的配置文件。

  • package.json: 项目的依赖管理文件。

  • README.md: 项目的介绍和使用说明。

  • LICENSE: 项目的开源许可证。

  • yarn.lock: 锁定项目依赖版本的文件。

2. 项目的启动文件介绍

gatsby-config.js

gatsby-config.js 是 Gatsby 项目的主要配置文件,用于配置网站的元数据、插件和其他设置。以下是一个示例配置:

module.exports = {
  siteMetadata: {
    description: "Personal page of John Doe",
    locale: "en",
    title: "John Doe",
    formspreeEndpoint: "https://formspree.io/f/[your-id]"
  },
  plugins: [
    {
      resolve: "@wkocjan/gatsby-theme-intro",
      options: {
        basePath: "/",
        contentPath: "content/",
        showThemeLogo: true,
        theme: "classic"
      }
    }
  ]
};

启动命令

在项目根目录下运行以下命令启动项目:

gatsby develop

3. 项目的配置文件介绍

content/profile.yaml

profile.yaml 文件用于配置个人资料信息,例如姓名、职业、技能等。以下是一个示例配置:

name: John Doe
position: Software Engineer
location: San Francisco, CA
bio: Passionate about coding and open source.
skills:
  - JavaScript
  - React
  - Node.js
tools:
  - VSCode
  - Git

content/projects.yaml

projects.yaml 文件用于配置项目信息,例如项目名称、描述、状态等。以下是一个示例配置:

- name: Project A
  url: https://project-a.com
  description: A web application built with React.
  status: live
  tags:
    - React
    - JavaScript
  icon: website
  image: project-a.png

content/work-history.yaml

work-history.yaml 文件用于配置职业历史信息,例如公司名称、职位、时间段等。以下是一个示例配置:

- company: Company A
  period: 2018-2020
  position: Software Engineer
  url: https://company-a.com

通过以上配置文件,您可以自定义您的个人品牌网站,展示您的技能、项目和职业历史。

gatsby-theme-intro Personal branding theme for developers gatsby-theme-intro 项目地址: https://gitcode.com/gh_mirrors/ga/gatsby-theme-intro

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

仲羿禹

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值