Git Product home page Git Product logo

blog-start's Introduction

Getting Started

If you want to create a pelican blog, which is ready for blogging in Farsi, you can use here as a starting point.

What you will get

Short Version

1. Clone this repository

TODO

Long Version

prerequisites

1. Install Pelican and Markdown

pip install pelican Markdown

2. Start a pelican project

cd path/to/blog/

Change your directory to a place you want to create you blog, then do:

pelican-quickstart

You can read more about how to kickstart a pelican blog here.

3. Create a simple content

Go inside the content directory and create a test content.

cd content
touch test-post.md

Then fill it with something like:

Title: یک بلاگ پست فارسی و امتحانی
Slug: persian-test
Date: 2013-05-16 17:16
Tags: آزمایشی

این یک تست است.

4. Add the sobhe theme

The theme repo is: https://github.com/sobhe/pelican-sobhe

Clone this repository to the root of your blog.

cd path/to/blog/
git clone [email protected]:sobhe/pelican-sobhe.git

Then edit your blog config (pelicanconf.py) so it uses this theme.

Add this to the end of pelicanconf.py:

THEME = 'pelican-sobhe'

5. Add the pelican-jalali plugin for persian dates

The plugin repo is: https://github.com/sobhe/pelican-jalali

Clone this repository recursively into your PLUGIN_PATH. If you have not set any PLUGIN_PATH yet, you must create one:

cd path/to/blog/
mkdir plugins
cd plugins
git clone --recursive [email protected]:sobhe/pelican-jalali.git

Make sure that you clone the plugin with --recursive, because it contains a submodule.

Now you need to edit your config and activate the plugin.

Add this to the end of pelicanconf.py:

import os
script_path = os.path.realpath(__file__)
blog_base_path = os.path.dirname(script_path)

PLUGIN_PATH = os.path.join(blog_base_path, 'plugins/')
PLUGINS = ['pelican-jalali']

6. Test that everything is working

You can test the blog you have created this way:

cd path/to/blog/
make html

If you see this output, eveything must be ok:

Done: Processed 1 articles and 0 pages in 0.16 seconds.

To see the live demo:

make serve

Then open a browser and navigate to http://localhost:8000/. You must see something like:

image

7. Going forward

  • make sure your config is right (edit pelicanconf.py and publishcond.py)
  • add more content

blog-start's People

Contributors

yassersouri avatar

Stargazers

 avatar Vahid Kharazi avatar Farbod Samsamipour avatar

Watchers

Alireza Nourian avatar James Cloos avatar

Forkers

kharazi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.