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

Drupal aliases now respect the 'source' config #454

Conversation

hugopeixoto
Copy link
Contributor

Alias markdown files were being generated in the current directory instead of the directory defined by the "source" configuration option.

This is my first time using jekyll, still trying to figure it out. I'm sorry if I missed something in how this is supposed to work.

@hugopeixoto hugopeixoto force-pushed the fix/drupal-aliases-should-respect-source-config branch from 66a3434 to 38e8c74 Compare September 17, 2021 17:42
Alias markdown files were being generated in the current directory
instead of the directory defined by the "source" configuration option.
@hugopeixoto hugopeixoto force-pushed the fix/drupal-aliases-should-respect-source-config branch from 38e8c74 to 49e650d Compare September 17, 2021 17:42
@mattr-
Copy link
Member

mattr- commented Sep 20, 2021

👋 Thanks for taking the time to contribute! Are alias markdown files a Drupal thing? I'm not aware of them.

Either way, this looks good to me. I'll wait a few days to hear back from you about alias markdown files before approving and merging, since I'd like to make sure I understand those properly.

@hugopeixoto
Copy link
Contributor Author

Alright, here's a bit of context:

Drupal's pages are called "nodes". You can access them by navigating to /node/<nodeid>. You can also define URL aliases, like mapping /about-us to /node/42. These aliases are stored in the url_alias table.

jekyll-import already handles these aliases by going through that table and creating markdown files in the root, like about-us.md, with a layout (refresh.html) that contains a meta http-equiv redirect to the correct post. With this in place, when you access /about-us, you get redirected to /post/2021-09-20-about-us. It's not exactly the same behavior, but this is what's currently implemented.

What this PR does is to change the directory where these alias files are created. Instead of always creating them on the root directory, it uses the source option in the jekyll configuration, like every other page.

@mattr- mattr- changed the title Aliases now respect the 'source' config Drupal aliases now respect the 'source' config Sep 20, 2021
@mattr-
Copy link
Member

mattr- commented Sep 20, 2021

Thanks so much for explaining that!

@jekyllbot: merge +minor

@jekyllbot jekyllbot merged commit 7a68861 into jekyll:master Sep 20, 2021
jekyllbot added a commit that referenced this pull request Sep 20, 2021
@hugopeixoto hugopeixoto deleted the fix/drupal-aliases-should-respect-source-config branch September 20, 2021 15:46
@jekyll jekyll locked and limited conversation to collaborators Sep 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants