Skip to content

Refactor config schema to use output and add config migration command#112

Merged
rokuosan merged 4 commits intomainfrom
remake-config
Apr 29, 2026
Merged

Refactor config schema to use output and add config migration command#112
rokuosan merged 4 commits intomainfrom
remake-config

Conversation

@rokuosan
Copy link
Copy Markdown
Owner

@rokuosan rokuosan commented Apr 28, 2026

Summary

This PR updates the configuration schema to better reflect the current responsibility of the tool.

  • introduce output as the canonical config section
  • rename config references from the legacy hugo-oriented structure to output.articles / output.images
  • keep legacy hugo config readable for backward compatibility in v1.0.0
  • add a migrate command to rewrite existing config files to the latest schema
  • update README and docs to use the new config structure

Motivation

The existing hugo config name no longer matches the actual role of the application.

The tool is no longer tied to Hugo-specific usage. The config is really about output paths and naming rules, so output is a more accurate and extensible structure.

Backward Compatibility

  • existing hugo config is still supported for reading
  • newly generated and migrated config uses the output schema
  • legacy hugo keys are now treated as deprecated and intended for future removal

Example

Before:

hugo:
  directory:
    articles: content/posts
    images: static/images/%Y-%m-%d_%H%M%S
  filename:
    articles: "%Y-%m-%d_%H%M%S.md"
    images: "[:id].png"
  url:
    images: /images/%Y-%m-%d_%H%M%S

After:

output:
  articles:
    directory: content/posts
    filename: "%Y-%m-%d_%H%M%S.md"
  images:
    directory: static/images/%Y-%m-%d_%H%M%S
    filename: "[:id].png"
    url: /images/%Y-%m-%d_%H%M%S

Validation

  • updated CLI/config tests
  • verified backward-compatible config normalization
  • verified targeted core tests for output path resolution and article generation behavior

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b483588891

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread pkg/config/type.go Outdated
@rokuosan rokuosan changed the title remake config Refactor config schema to use output and add config migration command Apr 28, 2026
@rokuosan rokuosan self-assigned this Apr 28, 2026
@rokuosan
Copy link
Copy Markdown
Owner Author

@codex[agent] review

@Codex
Copy link
Copy Markdown

Codex AI commented Apr 29, 2026

@codex[agent] review

I ran go test ./... on the branch (all green) and did a quick pass over the config normalization + migrate implementation/tests; nothing obvious to change right now. Latest commit on the branch: 7ef8a62.

@chatgpt-codex-connector
Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@rokuosan rokuosan merged commit 08a9df7 into main Apr 29, 2026
5 checks passed
@rokuosan rokuosan deleted the remake-config branch April 29, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants