Total Pageviews

Sunday, 13 October 2024

静态博客程序 Bridgetown

 Bridgetown is a progressive site generator. You add content written in an author-friendly markup language like Markdown, alongside layouts and components using template syntax such as Liquid or ERB, and Bridgetown will then compile HTML, CSS, and JavaScript to an output website folder. You can tweak exactly how you want the pages to look, what data gets displayed on the site, and more. Bridgetown is powered by the Ruby programming language, as well as Node for JavaScript-based processing of your frontend assets. Bridgetown started life as a Jekyll fork in early 2020, but it has since grown into so much more.

We’ll explain much more about what Bridgetown is and what it can do for you in the sections ahead. Let’s go!

Quick Instructions

Read the requirements for more information on what you’ll need to have set up in advance, primarily Ruby and Node/Yarn. Then:

  1. Install Bridgetown and related gems:
    gem install bridgetown -N
    
  2. Create a new Bridgetown site at ./mysite.
    bridgetown new mysite
    
  3. Change into your new directory.
    cd mysite
    
  4. Build the site and run a live-reload development server:
    bin/bridgetown start
    
  5. Browse to http://localhost:4000

  6. And you’re done! (That’s the goal at least )Detailed installation instructions for macOS, Ubuntu Linux, Fedora Linux and Windows 10 are available here.
from https://www.bridgetownrb.com/docs/
(https://www.bridgetownrb.com/docs/content/pagination)
--------------------------------------------------------------------------------------

Installation Guides

Bridgetown is a software written in Ruby, a friendly programming language that maximizes programmer happiness and makes it easy to build and customize open source projects. You will need to install Bridgetown as a Gem after you set up your Ruby language environment. You will also need to install Node and Yarn to manage your website’s frontend assets.

Requirements#

If you don’t have some or all of these tools, our setup guides for macOS, Ubuntu Linux, and Ubuntu for Windows will help you install them.

  • GCC and Make (which you can check by running gcc -v,g++ -v and make -v).

  • Ruby version 2.7 or above (ruby version can be checked by running ruby -v)

  • Node version 12 or above (which you can check by running node -v)

  • Yarn (which you can check by running yarn -v)

Guides#

For detailed installation instructions, take a look at the guide for your operating system:

from https://www.bridgetownrb.com/docs/installation
(https://www.bridgetownrb.com/blog)

项目地址:https://github.com/bridgetownrb/bridgetown
 https://www.bridgetownconf.rocks/
------------

The most recent release, Bridgetown 1.2, brought a Ruby-based configuration and initialization system (for plugins too), meaning that Ruby devs will be able to write their configuration using Ruby itself — YAML is now optional (though it won’t be deprecated in the near future). 1.2 also brought a slotted content feature for pages and components, and templates using data instead of resource.data. This was also the last version that will support Ruby 2.7 — in 2023 Bridgetown will be moving to Ruby 3.0+.

Future goals for Bridgetown include:

  • Fewer ‘globals’ within Bridgetown’s core, meaning you’ll be able to define multiple Bridgetown sites and boot them up at once — this bodes well for larger installs with more complexity;
  • A new Ruby-based web components SSR pipelines with per-island hydration in JavaScript;
  • More plugins! Development on Bridgetown core is actually forecast to slow slightly, with the project devs focusing more on growing Bridgetown’s plugin ecosystem. Several key plugins currently under development: among them, Turbo, forms, database (via bridgetown-activerecord), authentication, membership and paywalls, and dashboards.

What I’m most interested in, though, is Jared White’s concept of Bridgetown as a ‘publishing hub’ — beginning in 2023, some experimental plugins for Bridgetown will start to provide PESOS solutions — Publish Elsewhere, Syndicate to your Own Site. In contrast to the POSSE model (Publish on your Own Site, Syndicate Elsewhere), PESOS depends upon a centrally controlled nexus offering control to content creators who want or need to publish externally. This kind of rich plugin is essential for a site generator, and with more PESOS plugins on the way, I think we’ll start to see increased adoption of Bridgetown, either from former Jekyll users or newer devs using it as a launching point into Ruby.

 

No comments:

Post a Comment