Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Remove the date from the blog URL #276

Merged
merged 5 commits into from
Dec 5, 2024
Merged

Conversation

sy-records
Copy link
Member

Fix #275

How should we name the post file?

  1. As before, the slug needs to be added. Example: 2024-11-27-apache-answer-1.4.1-release, Add slug
  2. Move out the year, month and day, the default is slug. Example: apache-answer-1.4.1-release

@fenbox fenbox requested a review from shuashuai December 4, 2024 06:39
@fenbox
Copy link
Member

fenbox commented Dec 4, 2024

Long pain is not as good as short pain, I choose choice 2.

@sy-records sy-records force-pushed the change/url branch 2 times, most recently from 51a6eba to 55f0617 Compare December 4, 2024 07:52
@sy-records
Copy link
Member Author

Done. It can be accessed at https://change-url.apache-answer.pages.dev/.

@shuashuai
Copy link
Member

Done. It can be accessed at https://change-url.apache-answer.pages.dev/.

Functionality is fine, the docusaurus.config.js configuration file could be optimized by extracting the url for redirect into a separate file so that it doesn't affect the reading of docusaurus.config.js.

eg:

create redirect.js file

module.exports = [ 
  {
    to: '/community/support',
    from: ['/contact', '/community'],
  },
  ...
]

require and use in docusaurus.config.js file

eg:

const redirectPaths = require('./redirect.js');

[
      '@docusaurus/plugin-client-redirects',
      {
        redirects: redirectPaths,
      },
    ],

Copy link
Member

@shuashuai shuashuai left a comment

Choose a reason for hiding this comment

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

Thanks!

@shuashuai shuashuai merged commit f407e46 into apache:main Dec 5, 2024
1 check passed
@sy-records sy-records deleted the change/url branch December 5, 2024 09:06
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.

Remove the date from the blog URL
3 participants