Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fluent PostgreSQL adapters for SteamPress

License

NotificationsYou must be signed in to change notification settings

brokenhandsio/steampress-fluent-postgres

Repository files navigation

SteamPress

LanguageBuild StatusCode CoverageMIT License

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

Usage:

Add the package to yourPackage.swift dependencies:

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

Inconfigure.swift add the SteamPress Fluent Postgres provider:

import SteampressFluentPostgres// ...letprovider=SteamPressFluentPostgresProvider()try services.register(provider)

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

varmigrations=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 mainSteamPress 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 athttp://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.

About

Fluent PostgreSQL adapters for SteamPress

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp