GithubHelp home page GithubHelp logo

dirdown's Introduction

Dirdown

Minimal file-system based CMS

Travis CI tests

Generate a new dirdown web application

  1. Invoke the generator
    $ mojo generate dirdown_app
  2. Edit the markdown content in dirdown_content.
  3. Start the server via
    $ morbo dirdown
    Server available at http://127.0.0.1:3000
  4. Dump the content as static files via
    $ ./dirdown dump

Use it as a plugin for your own Mojolicious web apps:

#!/usr/bin/env perl
use Mojolicious::Lite;

# Load the dirdown CMS under /content
plugin Dirdown => {
    prefix  => '/content',
    dir     => app->home->rel_file('dirdown_content'),
};

get '/' => {text => 'Hello world!'};

app->start;

Prerequisites

Module Version
Mojolicious 8.12
Text::Markdown 1.000031
YAML::XS 0.76
Test::Exception (Tests only) 0.43

License and copyright

Copyright (c) 2019 Mirko Westermeier (@memowe, [email protected])

Released under the MIT (X11) license. See LICENSE.txt for details.

dirdown's People

Contributors

memowe avatar

Watchers

 avatar  avatar  avatar

Forkers

diegosiqueir4

dirdown's Issues

Tree and stack navigation

We need two data structures prepared for different types of navigation menus in templates:

  • A tree structure
  • A stack structure (first level, second level, etc)

These data structures should have a general version (site map) and a specific version for a given path. For a specific path there should be only the relevant data in it and we need something like active => 1 for nodes in the given path.

Operate as a plugin only

Now, after some web app development, it shouldn't be a web app on its own, to make things easier. The routes should be set up in the plugin.

Refresh the content tree

As the content tree is stored as lazy evaluated attributes, it also won't change when content changes.

Create a helper method to clear the cache, probably via dirdown->tree(undef).

Generator script

Invoke the generate dirdown command:

  • generates a web app dirdown, that uses Dirdown as a plugin
  • inflates the Dirdown web app templates

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.