Giter Site home page Giter Site logo

kjaymiller / render-engine-microblog Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 2.0 104 KB

MIcroblog custom collection for Render Engine

Home Page: https://kjaymiller.github.io/render-engine-microblog/

License: MIT License

Python 82.34% HTML 17.66%
render-engine

render-engine-microblog's Introduction

Render Engine Microblog Parser

This is a parser to create a microblog using Render Engine. This is based on the Blog Custom Collection.

This follows the guidance used by Micro.blog which is to be a post with no title. Slugs by default are the slugified datetime string in YYYYMMDDHHMMSS format.

This also create an RSS feed that you can use to syndicate your microblog posts to other services.

Your content is expected to use render engine's MarkdownPageParser or a derivative which is markdown with frontmatter. A date field is the only required metadata for the page object.

---
date: 2023-01-01 12:00:00
---

Hello **World**! 

Installation

Install using pypi. If you haven't already, install render-engine

pip install render-engine render-engine-microblog

Usage

Import the parser and collection

In your render_engine config file import the MicroBlog collection class.

from render_engine import Site
from render_engine_microblog import MicroBlog

Create a collection for your site

Create your collection like you would a blog. You will need to pass a content_path.

site = Site()

@site.collection
class MicroBlog(MicroBlog):
    content_path = "content/microblog"

render-engine-microblog's People

Contributors

izaan17 avatar kjaymiller avatar vinayakg311 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

render-engine-microblog's Issues

Fix tests import in GH Actions

Currently it's loading requirements which is way more than what is needed.

Instead of managing requirements.txt and pyproject.toml we can import the package locally with the dev extra.

python -m pip install -e ".[dev]"

Fix Workflow testing to pass

================================================================ short test summary info ================================================================
FAILED tests/test_collection.py::test_microblog_post_content_is_content - TypeError: MarkdownPageParser.parse() got an unexpected keyword argument 'page'
ERROR tests/test_collection.py::test_microblog_site_page - TypeError: MarkdownPageParser.parse() got an unexpected keyword argument 'page'
ERROR tests/test_collection.py::test_microblog_site_loads_theme - TypeError: MarkdownPageParser.parse() got an unexpected keyword argument 'page'
ERROR tests/test_collection.py::test_microblog_archive_uses_microblog_theme - TypeError: MarkdownPageParser.parse() got an unexpected keyword argument 'page'

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.