Pages

Monday, 14 October 2024

静态博客程序jigsaw

 

Installation

System Requirements

To use Jigsaw, you need to have PHP (minimum version 8.0) and Composer installed on your machine. You'll also optionally need Node.js and NPM installed if you want to use Laravel Mix to compile your CSS and Javascript.

1. Create the Project Directory

First, create a new directory for your site:

1mkdir my-site

2. Install Jigsaw via Composer

Next, navigate to your new project directory and install Jigsaw using Composer:

1cd my-site
2composer require tightenco/jigsaw

3. Initialize your Project

Finally, from your project directory, run Jigsaw's init command to scaffold the default directory structure:

1vendor/bin/jigsaw init

Alternatively, get up and running quickly by using a starter template, which starts you off with a fully-configured, professionally-designed site, ready for you to customize with your content. You can use one of Jigsaw's built-in templates for a blog or an open source documentation site, or use a third-party template.

1vendor/bin/jigsaw init blog

or

1vendor/bin/jigsaw init docs

from https://jigsaw.tighten.com/docs/installation/

(https://github.com/tighten/builtwithjigsaw,

https://builtwithjigsaw.com/)

----------------------------------------------------------------

Example Jigsaw site using GitLab Pages: https://pages.gitlab.io/jigsaw/

Example Jigsaw website using GitLab Pages.

Learn more about GitLab Pages at https://pages.gitlab.io and the official documentation https://docs.gitlab.com/ce/user/project/pages/.

Table of Contents generated with DocToc

GitLab CI

This project's static Pages are built by GitLab CI, following the steps defined in .gitlab-ci.yml.

Building locally

To work locally with this project, you'll have to follow the steps below:

  1. Fork, clone or download this project.

  2. Install Jigsaw.

  3. Generate the website:

    ./vendor/bin/jigsaw build
  4. Preview your project:

    ./vendor/bin/jigsaw serve
  5. Add content.

Read more at Jigsaw's documentation.

GitLab User or Group Pages

To use this project as your user/group website, you will need one additional step: just rename your project to namespace.gitlab.io, where namespace is your username or groupname. This can be done by navigating to your project's Settings.

Also, you will need to either remove the variable $base from every views or modify the base entry found in config.production.php:

return [
    ...
    'base' => '/jigsaw',
];

Read more about user/group Pages and project Pages.

from https://gitlab.com/pages/jigsaw

No comments:

Post a Comment