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

Wordpress - Add Site Prefix #203

Merged
merged 3 commits into from
Jun 30, 2015
Merged

Wordpress - Add Site Prefix #203

merged 3 commits into from
Jun 30, 2015

Conversation

dirkkelly
Copy link
Contributor

I came across #185 when trying to import a multi site installation.

To give some background, the way that this installation has it configured, the sites are each stored as wp_x_ prefixes.

screen shot 2015-06-24 at 12 07 44 am

In order to support this I have added the site-prefix option which is prepended before all calls to these specific tables.

Import site wp_2_

ruby -rubygems -e 'require "jekyll-import";
  JekyllImport::Importers::WordPress.run({
    "dbname"      => "blogname",
    "user"        => "username",
    "password"    => "password",
    "host"        => "blog.com",
    "site_prefix" => "2_"
  })'

@@ -191,7 +198,6 @@ def self.process_post(post, db, options, page_name_list)
excerpt = content[0...more_index]
end
if options[:more_anchor]
more_link = "more"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

vim pointed out this variable wasn't being used.

@dirkkelly
Copy link
Contributor Author

I have successfully used this on 3.4.2, sorry I don't have a more recent installation.

@dirkkelly dirkkelly mentioned this pull request Jun 24, 2015
@@ -191,7 +198,6 @@ def self.process_post(post, db, options, page_name_list)
excerpt = content[0...more_index]
end
if options[:more_anchor]
more_link = "more"
content.sub!(/<!-- *more *-->/,
"<a id=\"more\"></a>" +
"<a id=\"more-#{post[:id]}\"></a>")
Copy link
Member

Choose a reason for hiding this comment

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

I think they wanted it here ^^

@parkr
Copy link
Member

parkr commented Jun 24, 2015

Thanks for the patch! Just one comment. :)

@dirkkelly
Copy link
Contributor Author

Thanks @parkr, I've returned that line

@parkr
Copy link
Member

parkr commented Jun 29, 2015

Great! Thanks, @dirkkelly. One more thing – can you please add this option to the documentation page for this importer?

@dirkkelly
Copy link
Contributor Author

@parkr I think I already have then? Sorry if I'm misunderstanding the request.

https://github.com/jekyll/jekyll-import/pull/203/files#diff-6ffabbc9b04e59e6903b73835e6b068bR29

@parkr
Copy link
Member

parkr commented Jun 30, 2015

@dirkkelly Ah! Sorry about that. I was convinced we setup our documentation differently and I read that incorrectly. Thanks.

parkr added a commit that referenced this pull request Jun 30, 2015
@parkr parkr merged commit 61fdfd4 into jekyll:master Jun 30, 2015
parkr added a commit that referenced this pull request Jun 30, 2015
@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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants