lumeland / lume.land

The website of lume.land
https://lume.land
MIT License
72 stars 68 forks source link

Update deprecated shortcuts #110

Closed quadratz closed 7 months ago

quadratz commented 7 months ago

According to the changelog, these shortcuts are no longer available. https://github.com/lumeland/lume/blob/5800d1108a34e1c9c74e7a6ea42a6c7f84dae6eb/CHANGELOG.md?plain=1#L222-L225

netlify[bot] commented 7 months ago

Deploy Preview for lumeland ready!

Name Link
Latest commit 2d4cb44f6fd8025970fc1719e197bca819a05c2c
Latest deploy log https://app.netlify.com/sites/lumeland/deploys/65d2a818f80afa00086e18b0
Deploy Preview https://deploy-preview-110--lumeland.netlify.app/docs/overview/installation
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

oscarotero commented 7 months ago

Hmmm, maybe it's not well explained (let me know if you have a suggestion for improving this). The CLI interface has these flags to create the environment variables easier. Take a look to: https://github.com/lumeland/cli/blob/main/mod.ts#L27-L47

quadratz commented 7 months ago

Oh, that's great. I thought the flag was no longer available since I got an error. Could you tell me the correct way to use the flag? Here is the error:

PS C:\Users\dev> deno task serve
Task serve deno task build -s
Task build deno task lume "-s"
Task lume echo "import 'lume/cli.ts'" | deno run -A - --warning --config=site/lume/config.ts "-s"

  Usage:   πŸ”₯lume
  Version: v2.0.3

  Description:

    A static site generator for Deno.
    Docs: https://lume.land

  Options:

    -h, --help               - Show this help.
  error: Unknown option "--warning". Did you mean option "--version"?

    -V, --version            - Show the version number for this program.
    --config       <config>  - The config file path.
    --src          <src>     - The source directory for your site.                   (Default: "./")
    --dest         <dest>    - The build destination.                                (Default: "_site")
    --location     <type>    - The URL location of the site.                         (Default: "http://localhost")
    -s, --serve              - Start a live-reloading web server and watch changes.
    -p, --port     <port>    - The port where the server runs.                       (Default: 3000, Depends: --serve)
    -o, --open               - Open the site in a browser.                           (Depends: --serve)
    -w, --watch              - Build and watch changes.

  Commands:

    new          <archetype> [arguments...]  - Run an archetype to create more files.
    upgrade                                  - Upgrade your Lume executable to the latest version.
    run          <script...>                 - Run one or more scripts from the config file.
    completions                              - Generate shell completions.

  Examples:

    Lume:                  Builds the site.
    Lume --serve:          Serves the site in localhost.
    Lume upgrade:          Upgrades Lume to the latest version.
    Lume run <script>:     Runs a custom script.
    Lume [COMMAND] --help: Shows the help for a command.
oscarotero commented 7 months ago

This is only available with Lume CLI (which is a different package as Lume). It allows to execute Lume without typing deno task lume. You can install it with:

deno install --allow-run --allow-env --allow-read --name lume --force --reload https://deno.land/x/lume_cli/mod.ts

After that, you'll have the lume command. Run lume to build the site, lume -s to start a local server, and lume -s --warning to start a local server and create the LUME_LOGS=warning environment variable, etc. (more info)

quadratz commented 7 months ago

Apologies for the oversight. Given that the previous and next sections discuss running Lume with Deno tasks, I mistakenly thought this section also covered the same topic, not realizing it clearly mentions, "To avoid typing deno task all the time, you can install the Lume CLI script." With this clarification, we can proceed to close this PR. Thank you for your answer.