Giter Site home page Giter Site logo

bit-badger / myweblog Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 0.0 508 KB

A lightweight, low-configuration .NET blogging / podcasting platform

Home Page: https://bitbadger.solutions/open-source/myweblog/

License: MIT License

F# 97.43% CSS 0.26% JavaScript 1.35% Liquid 0.73% Dockerfile 0.22%
dotliquid fsharp giraffe liquid rethinkdb sqlite postgresql

myweblog's People

Contributors

danieljsummers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

myweblog's Issues

Fix default theme

#21 ended up breaking a few things in the default theme; fix those in the next release.

Podcasts - Support People / Groups

The podcast:person element allows name, role, group, image, and URL to be assigned to each person known to a podcast. It can be attached at the channel or item level. The podcast:valueRecipient element can be a person or a service and has several attributes; these will likely be the same for people across a podcast, but may need to vary for each episode.

For this issue, create the following (all at the web log level):

  • The ability to manage known persons, including the podcast:person attributes, as well as default customKey, customValue, type, and address values for this person. The person's name is the only required value.
  • For each podcast feed, allow the channel-level person list to be selected, optionally overriding the role and group attributes. (A future issue will add default value recipients.)
  • For each episode, copy the podcast-level defaults to the episode. Provide the ability to add persons at the episode level, as well as changing the default persons' role or group for that episode. (A future issue will do the same for value recipients.)
  • Modify the feed generation logic to produce the podcast:person entries.

Uploads

Create a straightforward way to upload images (or other attachments).

  • Create a "slug" for each web log; this is the path under which uploads will be stored.
  • Default to storing uploaded images in the database. (This will need an endpoint to return the data as well.)
  • Allow images to be written to the filesystem. (The static file middleware will serve these assets.)
  • Add database-stored images to the backup and restore processes.

Support podcast:chapters (phase 1)

The Podcasting 2.0 XSD defines the podcast:chapters element.

  • Add two meta tags - episode_chapter_file and episode_chapter_type.
  • Add a "default chapter type" to the podcast feed options, and use it when episode_chapter_type is missing.

Use NodaTime for date/time handling

.NET's DateTime type is not ideal for dealing with time zones, parsing, etc. Use it for all data-related date storage; we may still need to convert to DateTime for display (as DotLiquid knows that type), but the storage and calculation will be more explicit.

This will require migration for SQLite and RethinkDB data stores.

Establish user access levels

Currently, the only security determination is logged on or not. Establish the following security levels; within this list, each one can also perform the tasks of those above it.

  • Establish user levels (described below)
  • Place restrictions on existing functionality according to those levels. UI elements that are not allowed should not be displayed (i.e., unless the user can delete a post, the "Delete" link should not be shown). The server must also verify this access for each request.
  • Provide a user maintenance page, where WebLogAdmins and Administrators can assign their level or below to other users of the current web log
  • When creating a web log, if this is the first one, assign the user Administrator permissions; otherwise, assign them WebLogAdmin permissions
  • Provide a CLI upgrade-user option that will take a URL base and an e-mail address, and promote that user to Administrator status

Access Levels

  • Author can create new posts / pages and edit posts / pages they authored.
  • Editor can edit posts / pages they did not author, but may not delete them.
  • WebLogAdmin can delete posts / pages, as well as manage all web log settings (the current "logged on" level)
  • Administrator will be able to manage themes (#20), and may have other installation-wide controls as they are developed.

Add CLI help

Add a help command to the CLI that displays the list of available commands. Also, if an unrecognized command is received, display this same information.

Provide configurable redirect capability

When deployed by default, the application is dependent on configuration placed in front of it to handle rewrites/redirects. While myWebLog supports this in the form of "previous URLs" for posts and pages, long-running sites may need to redirect URLs that do not resolve to current posts or pages. A container (#38) provides even less of an opportunity to configure these outside the application.

Create a rudimentary redirect function that provides a matching string (either plain-text match or regular expression) and a new URL (verbatim or with capture group replacements for regular expressions). Any matches should be redirected permanently.

Implement PostgreSQL data option

Implement IData for PostgreSQL; this will provide a relational data option that does not require write access to the filesystem.

Use ASP.NET password hashing

  • Implement PasswordHasher for passwords within myWebLog.
  • Implement a set-password CLI function to allow users to set passwords, as the update to rc2 will break their old ones.

Support podcast:transcript

The Podcasting 2.0 XSD defines the podcast:transcript element. To implement this:

  • Add 4 new meta items: episode_transcript_url (supports permalinks), episode_transcript_type, episode_transcript_language, and episode_transcript_rel.
  • Ensure that url and type are both present if either is present.

Uploading theme does not invalidate cache

When an updated theme is loaded, the existing cache for that theme's templates should be flushed, so that they are loaded fresh on their next required use. (There is a call to do this; it is not working correctly.)

Podcasts - Full Chapter Support

Building on #5, provide a means for users to specify chapters for the media associated with a post (episode).

  • Define chapters per episode (see the spec for allowed fields).
  • Define a handler for each post that is accessed via /chapters/[permalink] and produces JSON chapters.
  • If no chapter metadata is specified, but chapters have been defined, return this link in the podcast:chapters element for the episode.
  • Provide a JSON chapter import feature, if the chapters were developed elsewhere and need to be imported.

(There may be other issues created to tackle some of these in bite-sized parts.)

Support start/end dashes in `include_template` tag

The Liquid templating language specifies that, if a tag starts with {%- or ends with -%}, if there is a line break immediately before or after that tag, it will not be preserved. Currently, the custom include_template tag does not support this, as it's implemented as a regular expression that is replaced when the template is initially read.

Modify the processing for this tag to support the no-new-line options the way other Liquid tags do.

Revise theme experience

The theme experience within myWebLog can be convoluted, and adds multiple steps to the onboarding experience. To remedy this: (#19 is a prerequisite)

  • Modify the startup logic to look for -theme.zip files in the application root folder, and load those themes on startup, using the name of the file without -theme.zip as the slug. (Currently, the name of the file without .zip becomes the slug.)
  • Provide a theme maintenance page (visible to Administrator users). The admin theme should not appear in the list of themes.
  • When a theme is uploaded, load it into the database, and save the .zip file in the application root; when it is removed, delete it from both places. (Users may not upload admin-theme.zip.)
  • Deletion should ensure that no weblogs are currently using that theme; additionally, it should not allow the admin or default themes to be deleted.
  • Update the build packaging process to place admin-theme.zip and default-theme.zip in the application root folder rather than a separate directory.
  • Update the installation / upgrade documentation.

Manage Revisions

Add functionality to view, restore, and prune revisions for pages and posts.

Implement episodes as a separate data structure

Move the existing episode metadata items into a strongly-typed structure. Include spots for #5 and #8 here as well. This will make things much less complex as we look to expand into implementing more episode items, and allows us to provide specific validation for these items.

Manage caches

Provide a way for an Administrator to clear / refresh the various run time caches; currently, refreshing them requires the application to be restarted.

Database Cleanup

There are a few fields in the database whose intent has changed, but the name has not. Prior to v2 RC, fix any such names, and take this opportunity to change data and support types' fields to be capitalized, per F# standard naming conventions.

(This will mostly affect the RethinkDB implementation, but ensure that the SQLite mappings also remain correct.)

Backup - use web log slug by default

Issue #2 created a slug for web logs. Make the backup file parameter optional, and if it is missing, use the slug from the web log (which is specified by URL base in the CLI).

Add indexes to SQLite tables

This was missed when developing the original SQLite implementation. All FKs need indexes, and ensure the compound indexes in the RethinkDB implementation are migrated to SQLite as appropriate.

Update htmx to v1.8.0

htmx v1.8.0 has been released, and fixes a problem with boosted links-with-anchors, which is affecting the Bit Badger Solutions site.

Deleting parent category renders children inaccessible

If a category has subcategories, and that category is deleted, the subcategories become inaccessible.

Modify the deletion process to check for subcategories, and if they exist, update them to the parent category of the category being deleted. Additionally, return a message that tells the user this happened, if any child categories are updated.

Admin UI cleanup

There is currently no loading indicator for htmx actions. Without it, the user does not know whether their click worked or not.

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.