{"id":13466715,"url":"https://github.com/flyhigher139/OctBlog","last_synced_at":"2025-03-26T00:31:23.933Z","repository":{"id":76032035,"uuid":"43957611","full_name":"flyhigher139/OctBlog","owner":"flyhigher139","description":"Yet another blog system powered by Flask and MongoDB","archived":false,"fork":false,"pushed_at":"2019-07-18T09:27:34.000Z","size":1122,"stargazers_count":446,"open_issues_count":1,"forks_count":149,"subscribers_count":28,"default_branch":"master","last_synced_at":"2024-10-29T20:32:42.746Z","etag":null,"topics":["blog","docker","flask","mongodb","mongoengine","python"],"latest_commit_sha":null,"homepage":"https://blog.igevin.info","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flyhigher139.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-10-09T13:42:13.000Z","updated_at":"2024-09-20T07:53:26.000Z","dependencies_parsed_at":"2024-01-16T06:08:31.399Z","dependency_job_id":"8b389526-80a7-41e7-91bf-029e9e54bf59","html_url":"https://github.com/flyhigher139/OctBlog","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flyhigher139%2FOctBlog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flyhigher139%2FOctBlog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flyhigher139%2FOctBlog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flyhigher139%2FOctBlog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flyhigher139","download_url":"https://codeload.github.com/flyhigher139/OctBlog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245566098,"owners_count":20636390,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blog","docker","flask","mongodb","mongoengine","python"],"created_at":"2024-07-31T15:00:49.203Z","updated_at":"2025-03-26T00:31:23.545Z","avatar_url":"https://github.com/flyhigher139.png","language":"HTML","readme":"# About OctBlog\n\n[![Join the chat at https://gitter.im/flyhigher139/OctBlog](https://badges.gitter.im/flyhigher139/OctBlog.svg)](https://gitter.im/flyhigher139/OctBlog?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![](https://images.microbadger.com/badges/image/gevin/octblog.svg)](http://microbadger.com/images/gevin/octblog \"Get your own image badge on microbadger.com\") [![](https://images.microbadger.com/badges/version/gevin/octblog.svg)](http://microbadger.com/images/gevin/octblog \"Get your own version badge on microbadger.com\") [![Build Status](https://travis-ci.org/flyhigher139/OctBlog.svg?branch=master)](https://travis-ci.org/flyhigher139/OctBlog)\n\n[OctBlog](https://github.com/flyhigher139/OctBlog) is almost the same with [MayBlog](https://github.com/flyhigher139/MayBlog) except that it is powered by [Flask](http://flask.pocoo.org/) and [MongoDB](https://www.mongodb.org/) rather than [Django](https://www.djangoproject.com/) and SQL Databases.\n\nAnd as my customary, I named it OctBlog as OctBlog was started in October, 2015\n\nOctBlog offers every function in MayBlog, and aims to do it better, its features are as follow:\n\n- Multiple user\n- OctBlog roles: su, admin, editor, writer, reader\n- Blog features: posts, pages, tags, and categories\n- Markdown support\n- Admin interface\n- Change configurations by configuration file or environment variable\n- Multiple comment plugin\n- User defined widgets\n- Deploy with docker\n- Sort posts by weight\n\n## Demo\n\n[Gevin's Blog](https://blog.igevin.info/) is powered by OctBlog\n\n## Explanation\n\nThe weight is used to order articles, and if you want to hidden an article from the article list, weight is also qualified:\n\nThe default weight for each article is 10, if a article's weight is heavier than 10, it will be firstly displayed, and if the weight is negative, the article will be never displayed in the article list\n\n## Dependency\n\n### Backend\n\n- Flask\n    - flask-script\n    - flask-login\n    - flask-admin\n    - Flask-WTF\n    - flask-principal\n    - flask_mongoengine\n- WTForms\n- mongoengine\n- markdown2\n- bleach\n\n### Frontend\n\n- jQuery\n- BootStrap\n    - [Clean Blog theme](http://startbootstrap.com/template-overviews/clean-blog/)\n    - bootbox.js\n    - bootstrap-markdown.js\n    - bootstrap-datetimepicker.js\n- Font Awesome\n- highlight.js\n\n## How to run OctBlog ?\n\n### Run from source code\n\nIf you want to see more about the source code, checkout the [source code readme](app)\n\n\n### Run by docker(recommended)\n\nRun OctBlog by docker is recommended, here are some instruction：\n\n#### First Run\n\n1\\. Get your OctBlog image\n\nIn command line, switch to OctBlog root directory, and run the following command to build your own OctBlog image:\n\n```bash\ncd app\n(sudo) docker build -t gevin/octblog:0.1 .\n\n# Now you can take a cup of coffee and wait for a few minutes :)\n```\n\nAlternatively, pull Octblog image from DockerHub(**recommended**):\n\n```bash\n(sudo) docker pull gevin/octblog:0.1\n```\n\n2\\. Create your `docker-compose.yml`\n\nYou need to create a docker-compose file similar to the `docker-compose_no_swarm.yml` file\n\nReplace ```/Users/gevin/projects/data/mongodb```  with a path on your machine\n\n\n\n3\\. Run OctBlog\n\n```bash\n(sudo) docker-compose up -d\n```\n\nThen you can visit OctBlog in your brower at `http://localhost`\n\nAll environment variables can be found in `/OctBlog/config.py`\n\nA `.env` file example:\n\n```\nDEBUG=false\nconfig=prd\nMONGO_HOST=mongo\nallow_registration=true\nallow_su_creation=true\n\nname=Gevin's Blog\nsubtitle=技术、生活都要折腾\ndescription=技术、生活都要折腾\n\nwechat_name=GevinView @ \u003ci class=\"fa fa-weixin\" aria-hidden=\"true\"\u003e\u003c/i\u003e\nwechat_subtitle=技术、生活都要折腾\n\ncopyright_msg=注：转载本文，请与Gevin联系\ndonation_msg=如果您觉得Gevin的文章有价值，就请Gevin喝杯茶吧！\nwechat_msg=欢迎关注我的微信公众账号\n\ngoogle_site_verification=\nallow_comment=true\n\n\nallow_daovoice=true\ndaovoice_app_id=\n```\n\n3\\. Get into OctBlog container\n\nMaybe you would like to dig into the container, the following command will help:\n\n```bash\n# Specify OctBlog container ID, eg:12345678\n(sudo) docker ps\n\n# Get into OctBlog container\n(sudo) docker exec -it 12345678 bash\n\n```\n\n#### After first run\n\n- Start OctBlog\n\n```bash\n(sudo) docker-compose start\n```\n\n- Stop OctBlog\n\n```bash\n(sudo) docker-compose stop\n```\n\n### Run by docker with swarm mode\n\n#### Preparation\n\nIf you want to use docker swarm mode, you need to activate this mode first:\n\n```\ndocker swarm init\n```\n\nThis command activates your docker swarm mode and make it as a swarm manager\n\nThen you can join other swarm node to this manager with `docker swarm join`\n\n#### Run OctBlog\n\nYou need to create a docker-compose file similar to the `docker-compose.yml` file.\n\nThen, start your application:\n\n```\ndocker stack deploy -c docker-compose.yml octblog\n```\n\nreview your application:\n\n```\ndocker stack ps octblog\n```\n\nremove your application:\n\n```\ndocker stack rm octblog\n```\n\nYou can refer to [Docker Documentation](https://docs.docker.com/) for more docker swarm usages.\n\n### Get started with OctBlog\n\n#### 1\\. Create a superuser to administrate OctBlog\n\nVisit the following url and create a superuser\n\n`http://localhost:8000/accounts/registration/su`\n\nIf the url is forbidden, you need to modify your configurations to allow the creation.\n\n#### 2\\. Administrate OctBlog\n\nThe admin home is: `http://localhost:8000/admin`\n\nYou will be redirected to login page if you haven't logged in\n\n#### 3\\. Modify the default configurations\n\nYou either change settings in `app/OctBlog/config.py` file, or set environment variables defined in that file.\n\n**Setting environment variables is recommended, and once the configuration is changed, you need to restart the service.**\n\n\n\n## License\n\nOctBlog is under [GPL2](https://github.com/flyhigher139/OctBlog/blob/dev/LICENSE)\n\n## What's more\n\nIf you find a bug or want to add a new feature, just issue me.\n\nWant to contribute? Please fork OctBlog and pull request to me.\n\nI'm not good at frontend development, so I used a free bootstrap blog theme. If you can redesign the blog theme and admin interface, I'll appriciate your work very much!\n","funding_links":[],"categories":["HTML"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflyhigher139%2FOctBlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflyhigher139%2FOctBlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflyhigher139%2FOctBlog/lists"}