/pycontw-blog

Blog for PyCon Taiwan

Primary LanguagePython

PRs Welcome Code style: black

PyCon Taiwan Blog

Getting Started

Prerequisites

Environment Setup

  1. Fork pycontw/pycontw-blog

  2. Clone the repository from your GitHub recursively. (i.e., your-user-name/pycontw-blog)

    git clone --recursive https://github.com/[your-user-name]/pycontw-blog.git
  3. Setup development environment through the following command

    pipenv install --dev
  4. Setup pre-commit hooks which check common errors when you do certain types of git commits

    pipenv run pre-commit install --hook-type commit-msg --hook-type pre-push --hook-type pre-commit

Write a new article

  1. Create a file in markdown or reStructuredText format inside the content directory. The following section will detail how we organized the content directory. Your filename should be the English title of your article. You'll have to translate it if there's no English title. The following is a minimal example of an article.

    • In markdown

      Title: My super post
      Date: 2010-12-03 10:20
      Modified: 2010-12-05 19:30
      Category: Python
      Tags: pelican, publishing
      Slug: my-super-post
      Authors: Alexis Metaireau, Conan Doyle
      Summary: Short version for index and feeds
      
      This is the content of my super blog post.
    • In reStructuredText

      My super post
      ##############
      
      :date: 2010-10-03 10:20
      :modified: 2010-10-04 18:40
      :tags: that's, awesome
      :category: yeah
      :slug: my-super-post
      :authors: Alexis Metaireau, Conan Doyle
      :summary: Short version for index and feeds

      Please read Writing content section in pelican documentation for format detail.

  2. After you finish a new article, you can run pipenv run inv livereload. It will build our current content into web pages, serve it on http://localhost:8000/, and open your default browser.

  3. If everything looks good, use the following command to add the new article to this repository.

    git add <your new article>
    
    # use commitizen to do git commit
    # choose the "new post" type if you're adding a new article
    pipenv run cz commit
    
    git push origin <your feature branch>
  4. Create a pull request to pycontw/pycontw-blog.

How do we organize our data in the content directory?

TBD

Authors

Wei Lee weilee.rx@gmail.com