Giter VIP home page Giter VIP logo

steampress-fluent's Introduction

SteamPress

Language Build Status Code Coverage MIT License

Steampress Fluent provides Fluent adapters for SteamPress to allow you to use SteamPress with a PostgreSQL or MySQL database.

Usage:

Add the package to your Package.swift dependencies:

dependencies: [
    ...,
    .package(name: "SteampressFluent", url: "https://github.com/brokenhandsio/steampress-fluent.git", from: "1.0.0"),
]

In configure.swift add the SteamPress Fluent Postgres provider:

import SteampressFluentPostgres

// ...

let provider = SteamPressFluentPostgresProvider()
try services.register(provider)

You also need to add the migrations for the different database models to your MigrationConfig:

var migrations = MigrationConfig()
// ...
migrations.add(model: BlogTag.self, database: .psql)
migrations.add(model: BlogUser.self, database: .psql)
migrations.add(model: BlogPost.self, database: .psql)
migrations.add(model: BlogPostTagPivot.self, database: .psql)
// This will create an admin user so you can log in! The password will be printed out when created.
migrations.add(migration: BlogAdminUser.self, database: .psql)
services.register(migrations)

This ensures the tables are created for use next time your app boots up.

For details on how to use SteamPress and the required templates see the main SteamPress README.

Configuration

You can configure the provider with the following optional configuration options:

  • blogPath - the path to add the blog to. For instance, if you pass in "blog", your blog will be accessible at http://mysite.com/blog/, or leave this out your blog will be added to the root of your site (i.e. http://mysite.com/)
  • feedInformation: Information to vend to the RSS and Atom feeds. Defaults to empty information.
  • postsPerPage: The number of posts to show per page on the main index page of the blog and the user and tag pages. Defaults to 10.
  • enableAuthorsPages: Flag used to determine whether to publicly expose the authors endpoints or not. Defaults to true.
  • enableTagsPages: Flag used to determine whether to publicy expose the tags endpoints or not. Defaults to true.

steampress-fluent's People

Contributors

0xtim avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.