GithubHelp home page GithubHelp logo

meddle0x53 / blogit Goto Github PK

View Code? Open in Web Editor NEW
42.0 42.0 7.0 191 KB

OTP application for generating blog posts from a Git repository containing markdown files.

License: MIT License

Elixir 100.00%

blogit's People

Contributors

9to1url avatar meddle0x53 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

Watchers

 avatar  avatar  avatar  avatar  avatar

blogit's Issues

Update the codebase with newer Elixir features

There are quite a few places where the code can be updated. These include new features of Elixir/Erlang, removal of deprecated stuff or rewriting code in a way that aligns with the latest trends.

  • Migrate away from the supervisor/2 and worker/2 functions commit from Supervisor.Spec
  • Use handle_continue/2 in Blogit.Server.init/1, Blogit.Components.Posts.init/1 functions (possible other places, too) instead of sending message with . This avoids a possible race condition
  • Clean the module that has use Application to not have so many functions
  • Add .formatter.exs file and run the formatter

Loading time too long

This is same as issue#7 on blogit-web.

I only have 1800 posts in blog, but the initial loading time took 3 hours.

I think one thing at least go wrong is even already has timestamps in md file still call Git log to get it again.

Plugin system.

I think we could do well with a little plugin system, you pass in some config options and some modules are ran(with some implemented behaviour).

Example:
I have a PITCHME.md, which github renders as a presentation using impress.js. I want to render those in a special way, so that I can display them on my own site. Let's say we put all the PITCHME.md files under presentations/. To display them correctly, we'll have to take all presentations, split them on the #HSLIDE, render each split to html and then join the different splits using sections. After that we pass in that to the view and using impress.js - it will check the sections and create our presentation.

To accomplish that, I would need to hook into the parsing process of the structure, get the presentations(configurable) folder and change the way the are rendered.

Generating an about.md

We could generate a summary of all the posts/pages. I have these features in mind:

  • It should be customizable(i.e. specifying only these folders, adding some more templates and stuff, like tags).
  • We should be able to add our own content to the generated thing(example: social links or homework tasks).
  • Pass in links to the other pages?

This will be useful when you create new lectures, which will be automatically added to this list.

Markdown should be parsed entirely for preview

Hi Meddle,

first of all, thanks for blogit - after I discovered it I just knew it was the right tool for me! To the problem at hand:

Consider the following markdown:

# Title

[Lorem ipsum][1] dolor sit amet, 
consectetuer adipiscing elit.

[1]: https://loremipsumgenerator.com/

If I set max_lines_in_preview to 3, I would still expect the link to be resolved. Since the pipeline generating preview does split first and parse markdown only of head, the link at the bottom is lost and the html generated is just

<!-- css and other distractions omitted -->
<h2>Title</h2>
<p>[Lorem ipsum][1] dolor sit amet, </p>
<a><h4>[...]</h4></a>
<hr class="post-divider" />

instead of

<!-- css and other distractions omitted -->
<h2>Title</h2>
<p><a href="https://loremipsumgenerator.com/">Lorem ipsum</a>dolor sit amet, </p>
<a><h4>[...]</h4></a>
<hr class="post-divider" />

Cheers, Markus

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.