PMPC 网站项目使用指南

PMPC 网站项目使用指南

pmpc-websiteMirror of https://git.fsfe.org/pmpc/website/项目地址:https://gitcode.com/gh_mirrors/pm/pmpc-website

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

PMPC 网站项目的目录结构如下:

pmpc-website/
├── site/
│   ├── static/
│   │   ├── img/
│   │   │   └── organisations/
│   ├── content/
│   ├── layouts/
│   ├── data/
│   └── config.toml
├── .drone.yml
├── Dockerfile
├── ansible/
├── apache/
└── README.md

目录介绍:

  • site/: 包含网站的主要内容和配置文件。
    • static/: 静态资源文件,如图片、CSS 和 JavaScript 文件。
      • img/organisations/: 存放组织图标的目录,建议上传 PNG 文件,最大宽度 150px 或高度 100px。
    • content/: 网站的内容文件,通常是 Markdown 格式。
    • layouts/: 网站的模板文件。
    • data/: 网站的数据文件。
    • config.toml: 网站的配置文件。
  • .drone.yml: Drone CI/CD 配置文件。
  • Dockerfile: Docker 镜像构建文件。
  • ansible/: Ansible 配置文件目录。
  • apache/: Apache 服务器配置文件目录。
  • README.md: 项目说明文档。

2. 项目的启动文件介绍

PMPC 网站项目使用 Hugo 作为静态网站生成器。启动文件主要是 config.toml.drone.yml

config.toml

这是 Hugo 的配置文件,包含了网站的基本配置,如网站标题、语言、菜单等。

.drone.yml

这是 Drone CI/CD 的配置文件,定义了自动部署的流程,包括代码推送、合并请求和定时更新等。

3. 项目的配置文件介绍

config.toml

baseURL = "https://example.org/"
languageCode = "en-us"
title = "PMPC Website"
theme = "pmpc"

[params]
  description = "This is the PMPC website."

.drone.yml

kind: pipeline
name: default

steps:
- name: build
  image: node:14
  commands:
  - npm install
  - npm run build

- name: deploy
  image: plugins/ssh
  settings:
    host: example.com
    username: root
    password:
      from_secret: ssh_password
    port: 22
    command: rsync -avz --delete public/ user@example.com:/var/www/pmpc-website

以上是 PMPC 网站项目的基本使用指南,包括项目的目录结构、启动文件和配置文件的介绍。希望对您有所帮助。

pmpc-websiteMirror of https://git.fsfe.org/pmpc/website/项目地址:https://gitcode.com/gh_mirrors/pm/pmpc-website

  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

喻珺闽

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

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

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

打赏作者

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

抵扣说明:

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

余额充值