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

Joomla3 import #184

Merged
merged 3 commits into from Nov 3, 2015

Conversation

Projects
None yet
3 participants
@derjoachim
Contributor

derjoachim commented Jan 25, 2015

Hi,

Currently I am in the process of migrating a Joomla 3 blog to Jekyll. The existing Joomla importer supports 1.5 and possible 2.5 (need to double check). As of version 3, the table structure was changed though. Although I have never programmed in Ruby before, the Joomla import script looked easy enough for me to adapt.

Disclaimer

I am not a ruby programmer. I merely adapted an existing script. I did some testing, but not very formally. Also, I am not sure on best practices regarding branching and code style.

Differences with the Joomla 1.5 import script

Table prefixes

In Joomla 1.5, the default table prefix was jos_. This proved to be quite insecure, so in later versions, random table prefixes are used. Therefore, I made the prefix option mandatory. Failing to enter one will result in an error message.

Categories

The main difference is that the sections and categories were merged, so that there is no section_id in #__content any more. This field has been replaced by catid. If a content item is not assigned by the content editor to a category, Joomla will assign it to a default category named 'Uncategorized'. I have filtered these articles out, since it is not common practice to not categorize blog posts. That being said, it is perfectly possible to import uncategorized content by explicitly pointing to the uncategorized category.

A category name is retrieved, which is put into the front matter.

Excerpts

Rudimentary support for excerpts has been added. In the #__content table in Joomla, the excerpt is saved into the introtext field. This field is retrieved and stored in the front matter as 'excerpt'.

Authors

The import script retrieves the author from the user table and stores the full name in the front matter as 'author'.

Publication status

The joomla 1.5 script imports articles that have the published and unpublished status. I updated this behavior to retrieve both published and archived articles. IMHO that makes more sense, since it is entirely possible to display archived articles on Joomla sites, but unpublished articles are invisible.

Documentation

Updated, but not sure how to test.

@parkr parkr self-assigned this Jan 26, 2015

parkr added a commit that referenced this pull request Nov 3, 2015

@parkr parkr merged commit 36594f2 into jekyll:master Nov 3, 2015

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

parkr added a commit that referenced this pull request Nov 3, 2015

parkr added a commit that referenced this pull request Nov 4, 2015

parkr added a commit that referenced this pull request Apr 14, 2016

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.