davetcc / hugojoomla

Converts Joomla database content into Hugo md files
Apache License 2.0
10 stars 7 forks source link

Changed description to use joomla article meta description and date to use joomla article modified date #14

Closed matt6697 closed 3 years ago

matt6697 commented 3 years ago
matt6697 commented 3 years ago

Meta description seems to be a better choice for the description field than the into text ( https://gohugo.io/content-management/front-matter) as the description field is used to populate the meta description in many hugo templates.

Created article date seems to better map to hugo publishDate and Modified date to the date field as joomla article created date can be far in the past for old but recently updated pages.

davetcc commented 3 years ago

Many thanks for the contribution, I've merged it to master. If you could check all is good I'll update the library dependencies and re-release it.

Joomla is a distant memory for me now, as this project was built to remove Joomla from all our sites.

joshuabeny1999 commented 3 years ago

HI @davetcc I am not matt, but i just downloaded the master and build the current jar according the readme and exported my Joomla Website. It worked only when i ran the jar inside the target folder. else it did not found the class com.thecoderscorner.web.hugojoomla.HugoJoomla. Additionally i needed to update the user password with mysql_native_password, else it won't connect to the DB with the error message: Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Client does not support authentication protocol requested by server; consider upgrading MySQL client

Maybe you need also Update the JDBC drivers.

davetcc commented 3 years ago

Many thanks for the feedback, I will update the mysql drivers later and try it myself, they are quite out of date now.

joshuabeny1999 commented 3 years ago

No problem. happy to help. Another Issue i dedectet that UTF-8 symbols like umlauts are wrong in the yaml-header part and i needed to replace them manually.

But i guess it not that simple to convert my website to hugo. I have now the content in MD-Files, but for example i used a plugin for the images, so they have a tag {gallery and not an normal image-tag. And maybe due i used a plugin for the editor, i have now everithing as html and a lot of &nbsc; in it. Is that correct that your tool keeps the HTML tags and not convert them? The issue since hugo 6.0 is that HTML is not rendered anymore by default: https://gohugo.io/getting-started/configuration-markup#goldmark

I guess in my case it is the easiest to manually rebuild the website and copy paste the content. Will be a loth of work. FYI: The current Website is achterbahnwissen.ch

davetcc commented 3 years ago

@joshuabeny1999 can we move this into an issue around UTF-8 characters. There is a possibility that an encoding needs to be picked in the free marker initialization. Please include an example of how it's going wrong, and what codepage your mysql database uses, and what codepage you used in the mysql driver.

In terms of the images, if you've used a custom plugin, you'll probably need to manually convert that part, or maybe locally change the java to handle it.

joshuabeny1999 commented 3 years ago

Thanks for the reply. I decided to stay at joomla, due joomla 3.10 still supported for a few years and when i create a new website from scratch and copy over only important pages over. Had also a image plugin which loads images from google that won't work for hugo. But then i could show only important images. Do not know if maybe the UTF-8 is related to this pull-request, due it only in the yaml-part an issue.

matt6697 commented 3 years ago

Hi @joshuabeny1999, HTML article content to markdown conversion has just been merged into master branch (PR #18 ). Could you test this new feature with one of your website and push your comments in issue #17 ?