Change default post status from 'draft' to 'publish'
- Changed default_status in direct URL mode from 'draft' to 'publish' - Changed default_status in Forgejo repository mode from 'draft' to 'publish' - Changed fallback in status determination from 'draft' to 'publish' - Posts without creativeWorkStatus in frontmatter will now be published immediately - Can still be overridden by setting creativeWorkStatus in frontmatter or status in YAML config
This commit is contained in:
parent
fb9720fb2a
commit
98d7244e9d
1 changed files with 3 additions and 3 deletions
|
|
@ -231,7 +231,7 @@ def process_post(wp_api: WordPressAPI, post_config: Dict[str, Any],
|
|||
)
|
||||
|
||||
# Status
|
||||
status = metadata.get('status') or post_config.get('status') or global_settings.get('default_status', 'draft')
|
||||
status = metadata.get('status') or post_config.get('status') or global_settings.get('default_status', 'publish')
|
||||
|
||||
# Excerpt
|
||||
excerpt = metadata.get('excerpt') or post_config.get('excerpt', '')
|
||||
|
|
@ -361,7 +361,7 @@ def main():
|
|||
# Erstelle minimale Konfiguration
|
||||
post_config = {'url': arg}
|
||||
global_settings = {
|
||||
'default_status': 'draft',
|
||||
'default_status': 'publish',
|
||||
'default_author': 'admin',
|
||||
'skip_duplicates': True,
|
||||
'skip_duplicate_media': True
|
||||
|
|
@ -410,7 +410,7 @@ def main():
|
|||
wp_api = WordPressAPI(wp_url, wp_username, wp_password)
|
||||
|
||||
global_settings = {
|
||||
'default_status': 'draft',
|
||||
'default_status': 'publish',
|
||||
'default_author': 'admin',
|
||||
'skip_duplicates': True,
|
||||
'skip_duplicate_media': True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue