项目作者: duckduckgo

项目描述 :
Generation of the static files of DuckDuckGo and its microsites.
高级语言: Perl
项目地址: git://github.com/duckduckgo/duckduckgo-publisher.git
创建时间: 2012-08-13T00:45:24Z
项目社区:https://github.com/duckduckgo/duckduckgo-publisher

开源协议:Other

下载


DuckDuckGo Publisher Build Status

Installation

You require the following libraries of https://duck.co/

  • DDG
  • DDGC::Locale::DuckduckgoDuckduckgo
  • DDGC::Locale::DuckduckgoDontbubbleus
  • DDGC::Locale::DuckduckgoDonttrackus

You can install App::DuckPAN of CPAN for this and then do the following command:

  1. duckpan \
  2. DDG \
  3. DDGC::Locale::DuckduckgoDuckduckgo \
  4. DDGC::Locale::DuckduckgoDontbubbleus \
  5. DDGC::Locale::DuckduckgoDonttrackus

Proxying Requests to Dev Server

My default, asset URLs are relative (e.g. /style.css). To proxy these request to a development server, you can specify the domain for individual sites:

  1. duckpan publisher --duckduckgo=http://moollaza.duckduckgo.com

Now all relative URLs will be directed to the specified server. In this case /style.css will be requested as http://moollaza.duckduckgo.com/style.css.

This allows you to develop locally and load assets from another server.

Publishing

Inside the repository you can do this to get a live simulation:

  1. duckpan publisher

If you want to generate the static files you can do the following from the repository:

  1. perl -Ilib bin/ddg_publisher test_publish

The directory test_publish will be generated and filled up with the results.