weijiang1994/Blogin
About
A personal blog system built with Flask.
Data & AnalyticsMeasured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- -2
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README-EN.md
OriginalBlogin
Blogin is a personal blog website that base on flask development.
Introduce
The personal blog site developed by the Flask Python Web framework consists of two parts: the front-end and the back-end.
Front-end
- Personal Blog
- Support blog categorization
- Support comment
- Support share your blog to personal social network
- Support blog archive
- Personal Gallery
- Support photo tag
- Support comment and like
- Support share your photo to personal social network
- Online Lite Tool
- Online word cloud graph generator
- Online multi translation tool
- Online Tang-Song poem search tool
- Online ocr tool
- Online IP real address search tool
- Comment System
- Support comment/delete/report
- Support reply comment
- Personal Profile
- Personal profile card
- Message notifycation
- Modify your information
- Record login log
- Tang-Song Poem
- Get a Tang-Song poem with random way
- Get Song Ci with random way
- Supply API to get Tang-Song poem
- Others
- Support make personal plan recently
- Support the contribution heat map display for the past three months
Back-end
Content manage
- Blog
- Create blog
- Modify blog
- Delete blog(It's just masking the display on the front page, not actually deleting it from the database)
- Gallery
- Add photo
- Modify Photo
- Delete Photo(like blog)
- Literature
- Tang-Song poem
- Modify(todo)
- New(todo)
- Tang-Song poem
- Personal Plan
- Add a new personal plan
- Modify personla plan
- Finish personal plan
- Blog
Social Mange
- Comment Manage
- Look up comments
- Delete comment(like blog)
- User Manage
- Look up users
- Ban user account
- Comment Manage
Server Manage
Server Satus
- CPU Usage
- Memory Usage
- Network Status
Log
- nginx Log
- App Log
- nginx error Log
Others
- Friend Link
- Add new friend link
- Abandon a friend link
- Milestone
- Add new milestone
- Abandon a milestone
- Friend Link
Start
Dependencies
Install mysql
Go to the official website of MySQL or mariaDB to download the installation package of the corresponding system and install it. Linux users can install via commands.
sudo apt-get install mysqlInstall redis
Go to redis official website to download the installation package for installation. Linux users can install it by following the command.
sudo apt-get install redisAfter successful installation, start the RedIS service with the following command.
sudo service redis-server startCreate Database
Open the terminal, enter the following command to enter the MySQL console, the specific command depends on your own MySQL database settings.
sudo mysql -u root -pcreate database blog CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; SHOW DATABASES ;If the content of the console output contains the
blogdatabase, the database was created successfully.
Initial
Clone code
For this step, the git environment must be configured on the local machine first. Please surf the Internet for details.
git clone https://github.com/weijiang1994/Blogin.gitConfigure environment variables
Many properties in the project are private and confidential, so we can save the values of these properties in the
.envfile, and block the file when uploading the code. Create a new.envfile in the root directory of the project, and enter the following in the file.MAIL_SERVER='your mail server' MAIL_USERNAME='your mail username' MAIL_PASSWORD='your mail server verify code' # not your email login password SECRET_KEY='your project secret' DATABASE_USER='your mysql/mariaDB database connect username' DATABASE_PWD='your mysql/mariaDB database connect user password' # BAIDU trans apiid and key BAIDU_TRANS_APPID='your app id for baidu trans' BAIDU_TRANS_KEY='your app key for baidu trans' # github oauth id and key GITHUB_CLIENT_ID='your github client id' GITHUB_CLIENT_SECRET='your github client secret' # gitee oauth id and key GITEE_CLIENT_ID='your gitee client id' GITEE_CLIENT_SECRET='your gitee client secret'**The mail server can apply for gmail mailbox or other mailbox. Please surf the Internet for the specific application process. It is very simple and will not be described here. **
Create a new .flaskenv file in the project root directory and enter the following content
FLASK_APP=blogin FLASK_ENV=developmentCreate and activate the virtual environment
Because the dependencies of each project are different, Python provides a virtual environment tool to isolate the dependencies of each project. Use the following commands to create a virtual environment.
cd Blogin python3 -m venv venvActivate it.
source venv/bin/activateActivate it on Windows OS.
venv\Scripts\activateInstall python dependencies
After we enter the virtual environment, we can use the following command to install third-party dependencies.
cd Blogin pip install -r requirements.txt -i https://pypi.douban.com/simpleInit database
Enter the root directory of the project, use the following command to initialize the database.
cd Blogin # init database and some configures flask initdb # create a admin account flask adminRun
flask run- Input http://127.0.0.1:5000 on your browser, then you can see the index page.
- https://2dogz.cn online
Explore related projects
Loading…