wp2hugo
1.11.0
이것은 WordPress 내보내기를 Hugo로 마이그레이션하는 데 가장 적합한 마이그레이션 도구입니다. 이는 내 개인 웹사이트를 Hugo 기반 사이트로 마이그레이션하는 동안 직면했던 몇 가지 이상한 사례를 처리합니다.
이는 주로 Hugo 기반 코드 생성을 대상으로 하지만 WordPress 블로그를 Mkdocs 또는 Jekyll과 같은 다른 시스템에서 사용할 수 있는 Markdown 기반 파일로 변환하는 데 사용할 수 있습니다.
저는 이 프로젝트가 가능한 한 널리 접근 가능하고 동시에 개발 비용도 지원되기를 바랍니다. 이 프로젝트는 비상업적, 개인적 용도로 완전 무료입니다. 라이센스를 통해 상업적인 사용이 제한됩니다. 상업적으로 라이선스를 취득하고 싶다면 언제든지 저에게 연락해주세요.
wp2hugo
도구 다운로드Tools -> Export
통해 WordPress 웹사이트 내보내기wordpress-export.xml
이라고 가정하고 $ wp2hugo --source wordpress-export.xml --download-media
사용하여 웹사이트를 생성합니다. $ wp2hugo
Usage of wp2hugo:
-authors string
CSV list of author name(s), if provided, only posts by these authors will be processed
-color-log-output
enable colored log output, set false to structured JSON log (default true)
-continue-on-media-download-error
continue processing even if one or more media downloads fail
-download-media
download media files embedded in the WordPress content
-font string
custom font for the output website (default " Lexend " )
-media-cache-dir string
dir path to cache the downloaded media files (default " /tmp/wp2hugo-cache " )
-output string
dir path to write the Hugo-generated data to (default " /tmp " )
-source string
file path to the source WordPress XML file
$ git clone [email protected]:ashishb/wp2hugo.git
$ cd wp2hugo/src/wp2hugo
$ make build_prod
# `./bin/wp2hugo` will contain the binary and you can use it as `$ ./bin/wp2hugo --source wordpress-export.xml --download-media`
wp2hugo
의 목표feed.xml
Hugo의 RSS feed.xml
에 매핑Summary
googlemaps
통해 Google 지도 삽입 마이그레이션 wp-content/uploads
이미지를 Hugo 정적 파일로 마이그레이션합니다. 기존 도구는 콘텐츠 마이그레이션 작업을 절반만 수행합니다. GUID, YouTube 포함, Google 지도 포함, 코드 포함과 같은 메타데이터를 제대로 마이그레이션하는 경우는 거의 없습니다.
이 저장소에는 실험 도구인 hugomanager
포함되어 있습니다. 나는 제목에서 URL을 자동으로 생성하고 어떤 블로그 게시물이 아직 초안으로 표시되어 있는지 또는 어떤 블로그 게시물이 곧 게시될 예정인지 파악하는 데 이 도구를 사용합니다.
당신은 그것을 통해 그것을 만들 수 있습니다
src/wp2hugo $ make build_hugo_manager
...
src/wp2hugo $ ./bin/hugomanager
A tool for managing Hugo sites e.g. adding URL suggestions, generating site status summary etc.
Usage:
hugomanager [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
help Help about any command
sitesummary Print site stats (e.g. number of posts, number of drafts etc.)
urlsuggest Suggests URLs for all the pending/future posts that are missing a URL
version Print the version number of HugoManager
Flags:
-a, --author string author name for copyright attribution (default " YOUR NAME " )
--config string config file (default is $HOME /.cobra.yaml)
-h, --help help for hugomanager
-l, --license string name of license for the project
--viper use Viper for configuration (default true)
Use " hugomanager [command] --help " for more information about a command.
메모: