项目作者: lhache

项目描述 :
The Better Play static page generator
高级语言: HTML
项目地址: git://github.com/lhache/tbp-cms.git
创建时间: 2017-09-04T19:06:36Z
项目社区:https://github.com/lhache/tbp-cms

开源协议:

下载


The Better Play CMS

Table of content

Installation

Instructions for pros

  • clone the project => git clone https://github.com/lhache/tbp-cms.git
  • run the project locally => hugo server -D

Instructions for noobz

It requires you have a terminal opened and are in the folder where the code is store, ‘workspace’ for exemple.

Prerequisites (MacOS)

Clone the repo on your computer
  • git clone https://github.com/lhache/tbp-cms.git
  • cd tbp-cms
Get latest code
  • git fetch will ask the internet of cloudz what’s the latest version of the app
  • git pull will bring that code to your computer
Push your code
  • make sure you got the latest code
  • git status to see all the files that have been modified
  • git add . will select all the files you need to commit or git add file.xx to add a specific one
  • git commit -m "write what you did here" will commit all the files previously selected
  • git push will push all the committed files to the repository on the cloudz of the internetz

If you’re not sure or if something strange prevents you from pushing code, ask a pro.

Deployment

The project is automatically deployed on http://tbp-cms.netlify.com/

HowTos

Info remember you’ll have to push your code every time you make a change y ou want to deploy

Adding new pictures

  • place your images in static/images
  • in markdown files, insert new pictures like {{< img src="/images/xxx.png" alt="description of the pic" >}}
  • if you use nested structures, for ex adding the image in static/images/lol/hello.jpg, then you would write {{< img src="/images/lol/hello.jpg" alt="description of the pic" >}}

Writing new content pages

  • the content is written in markdown, you can read instruction here or there
  • the available folders for your content are in the ‘content’ folder
  • warning make sure the new files ends by “.md”
  • create a new landing page => hugo new landing/xxxxxxxx.md
  • create a new content page => hugo new company/xxxxxxxx.md
  • warning make sure the new files have a “front-matter”, something that looks more or less like

    title: “Test”
    date: 2017-09-14T18:35:24+02:00
    draft: false