GithubHelp home page GithubHelp logo

zerasul / blask Goto Github PK

View Code? Open in Web Editor NEW
41.0 6.0 27.0 621 KB

Blog Engine based on Flask

Home Page: https://getblask.com/

License: GNU General Public License v3.0

Python 78.14% Batchfile 0.08% CSS 11.23% HTML 10.42% Dockerfile 0.13%
blog-engine flask blog site-generator python hacktoberfest

blask's People

Contributors

anu-9518 avatar cinnamonxi avatar cosmictiger avatar crisconru avatar dependabot-preview[bot] avatar dependabot[bot] avatar dukebody avatar jdevera avatar jennisu avatar juanjosalvador avatar mrgove10 avatar olivergs avatar picsldev avatar sebgoliot avatar sugamgoel28 avatar zerasul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

blask's Issues

Running Blask installed with pip

I've just installed Blask with pip and I don't know how to run it. Using the traditional method with FLASK_APP seems doesn't work.

Rewrite the docs

Documentation seems a bit confused. We need to write a tutorial,how install Blask and how to start using it!

Error executing pip install blask

Installing pip install blask. An error was found:

"unknown module m2r"

A pip install m2r before the installation of blask fix the error.

See the setup script and install it before the installation.

Error while installing Blask with "Bash on Windows"

Steps to reproduce: install with pip3 on Bash on Windows

Based on Ubuntu 16.04

Installed /tmp/pip-install-f43rlj95/markdown-full-yaml-metadata/setuptools_markdown-0.2-py3.4.egg
    Searching for pypandoc
    Reading https://pypi.python.org/simple/pypandoc/
    Best match: pypandoc 1.4
    Downloading https://files.pythonhosted.org/packages/71/81/00184643e5a10a456b4118fc12c96780823adb8ed974eb2289f29703b29b/pypandoc-1.4.tar.gz#sha256=e914e6d5f84a76764887e4d909b09d63308725f0cbb5293872c2c92f07c11a5b
    Processing pypandoc-1.4.tar.gz
    Writing /tmp/easy_install-a26dj6bs/pypandoc-1.4/setup.cfg
    Running pypandoc-1.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-a26dj6bs/pypandoc-1.4/egg-dist-tmp-vy80fo9l
    Maybe try:

        sudo apt-get install pandoc
    See http://johnmacfarlane.net/pandoc/installing.html
    for installation options
    ---------------------------------------------------------------

    zip_safe flag not set; analyzing archive contents...
    pypandoc.__pycache__.__init__.cpython-34: module references __file__


    !!! pandoc not found, long_description is bad, don't upload this to PyPI !!!



    Installed /tmp/pip-install-f43rlj95/markdown-full-yaml-metadata/pypandoc-1.4-py3.4.egg
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-f43rlj95/markdown-full-yaml-metadata/setup.py", line 19, in <module>
        version='0.0.2',
      File "/usr/lib/python3.4/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 239, in __init__
        self.fetch_build_eggs(attrs.pop('setup_requires'))
      File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 264, in fetch_build_eggs
        replace_conflicting=True
      File "/usr/lib/python3/dist-packages/pkg_resources.py", line 620, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "/usr/lib/python3/dist-packages/pkg_resources.py", line 852, in best_match
        dist = working_set.find(req)
      File "/usr/lib/python3/dist-packages/pkg_resources.py", line 503, in find
        raise VersionConflict(dist,req)     # XXX add more info
    pkg_resources.VersionConflict: (wheel 0.24.0 (/usr/lib/python3/dist-packages), Requirement.parse('wheel>=0.25.0'))

Configure Custom Error Pages

Can Be a good Idea use Custom Erro Pages using Markdown. This information about the markdown files can be at config.py

Convert from settings.py to an .env file

pipenv reads the .env files automatically, loading the environment variables that we put into them.

It is a very powerful way to correctly configure an application, following the indications of "The Twelve-Factor App".

An example of a settings.py file converted to an .env file could be the following:

desarrollo@desarrollo:~/Proyectos/pipenv/blask$ cat .env

# Minimal conf for Blask
FLASK_APP=main.py

# Name of the Template Folder.
templateDir="templates"

# Name of the post Folder
postDir="posts"

# default name of the template file.
defaultLayout="template.html"

# Default name of the static Folder
staticDir="static"

# Title of the blog
tittle="Blask | A Simple Blog Engine Based on Flask"

All the environment variables that we want to define, can be included in the .env file.

.gitignore excludes the .env file so that it can not be versioned, so that we can store sensitive data inside it.

A very popular custom is to create a file .env.example, with sample data, so that other developers find it very easy to generate their own .env file from the .env.example file .

Improve design at getblask.com

Seems very "expanded", there is a minimal margin between content borders and screen borders.

Adding class container to header and content can fix this. container-fluid class needs a container first.

Example with container class.

image

Create a Flask cli command line tool

As Flask you can run it using the command flask run; using Flask.cli tools we can use a new command called Blask and run blaks with:

Blask run

create a menu module

create a menu module for generating a menu with the blogs configures.

use a metadata called menu.

Fix the deprecation warning for the extensions on Markdown

During the tests we are seeing the next warning message:

DeprecationWarning: Extension classes accepting a dict on the single keyword "config" is pending Deprecation. Each setting should be passed into the Class as a keyword directly. The "config" keyword is deprecated and raise an error in version 2.7. See the Release Notes for Python-Markdown version 2.6 for more info.
DeprecationWarning)

That's because a new change on Markdown extensions library. We have to check this and remove this message.

Improve Code HighLigth

There is an error on code highligth that dosent show colors and don't respect endline characters.

Create a Pip Package

There is a setup.py file but can be a great idea to upload the package to Pypi.

Theme support

Adding theme support for Blask

Change the style of your blog by setting a config variable.

Add setup.py

Add setup.py with information about the project.

DistributionNotFound when running "blaskcli run"

OS: Bash on Windows (not last version)
Steps to reproduce:

  • Clone the repo
  • Export environment variable
  • Run blaskcli run
[19:12:35] [~/blask] [master *] โ†’ blaskcli run
Traceback (most recent call last):
  File "/usr/local/bin/blaskcli", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2749, in <module>
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 444, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 725, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 628, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: markdown-full-yaml-metadata

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.