### Initialize Curvenote Project Source: https://github.com/curvenote/docs/blob/main/content/publish/tutorial-deploy-project.md Run `curvenote init` to start an interactive setup for your site, which creates a `curvenote.yml` file. ```text % curvenote init Welcome to the Curvenote CLI!! ๐Ÿ‘‹ curvenote init walks you through creating a curvenote.yml file. You can use this client library to: - sync content to & from Curvenote - build & export professional PDFs - create a local website & deploy to https://your.curve.space Find out more here: https://curvenote.com/docs/cli ? What is the title of this project? (My Project) ``` -------------------------------- ### Example Site Folder Structure Source: https://github.com/curvenote/docs/blob/main/content/publish/tutorial-deploy-local.md After initialization and starting the local server, your project directory will be populated with essential files and folders for your Curvenote site. Key additions include `curvenote.yml` for configuration, `_build` for processed assets, and `public` for static files. ```text blog/ _build/* public/ logo.svg images/ hackathon2019.jpg blog-logo.svg index.md my-first-post.md my-first.notebook.ipynb ``` -------------------------------- ### Example template.yml Configuration Source: https://github.com/curvenote/docs/blob/main/content/publish/creating-templates.md This is an example `template.yml` file that defines custom questions for the `curvenote init` command. ```yaml # Curvenote Init Template Configuration # This file customizes the questions asked during 'cn init' # # ... (helpful comments) ... name: curvenote init version: 1 questions: - id: title field: project.title enabled: true type: text message: "Project title:" placeholder: "e.g., My Research Project" hint: null default: null required: false - id: subtitle field: project.subtitle enabled: true type: text message: "Subtitle:" placeholder: "A concise, single line description" hint: "Keep it short - this appears as a tagline" default: null required: false - id: description field: project.description enabled: true type: text message: "Description:" placeholder: "A longer description suitable for social media and listings" hint: "Used for social media and article listings" default: null required: false - id: authors field: project.authors enabled: true type: people message: "Add author(s):" placeholder: "ORCID, GitHub username, or comma-separated list" hint: "You can add multiple authors separated by commas" default: null required: false - id: keywords field: project.keywords enabled: true type: list message: "Keywords:" placeholder: "e.g., science, research, data analysis" hint: "Help others discover your project" default: null required: false ``` -------------------------------- ### Interactive CLI Initialization Source: https://github.com/curvenote/docs/blob/main/content/publish/tutorial-deploy-local.md Run `curvenote init` to start an interactive command-line process for setting up your Curvenote site. This process guides you through creating a `curvenote.yml` file and configuring essential project details. ```text Welcome to the Curvenote CLI!! ๐Ÿ‘‹ curvenote init walks you through creating a curvenote.yml file. You can use this client library to: - sync content to & from Curvenote - build & export professional PDFs - create a local website & deploy to https://your.curve.space Find out more here: https://curvenote.com/docs/cli ? What content would you like to use? Import from Curvenote โฏ Use the content & notebooks in this folder - Show me some demo content! (Disabled) ``` ```text ? What is the title of this project? (blog) My Blog ``` ```text Curvenote setup is complete!! ๐Ÿš€ You can use this client library to: - curvenote pull: Update your content to what is on https://curvenote.com - curvenote start: Start a local web server now! - curvenote deploy: Share content on https://your.curve.space Find out more here: https://curvenote.com/docs/cli ? Would you like to start a local server now? (Y/n) ``` ```text ? Would you like to start the curve.space local server now? Yes Starting local server with: curvenote start ๐ŸŒŽ Cloning Curvenote โคต๏ธ Installing libraries โš™๏ธ Writing site config.json โœจโœจโœจ Starting Curvenote โœจโœจโœจ โšก๏ธ Compiled in 356ms. ๐Ÿš€ Built in 398ms ๐Ÿ”Œ Server started on port 3000!๐Ÿฅณ ๐ŸŽ‰ ๐Ÿ‘‰ http://localhost:3000 ๐Ÿ‘ˆ ``` -------------------------------- ### README Example for Template Structure Source: https://github.com/curvenote/docs/blob/main/content/publish/creating-templates.md An example README section explaining the template's use of `extends` for configuration. ```markdown ## Template Structure This template uses `extends` to keep your `curvenote.yml` clean: - `_lab-defaults.yml` - Lab-standard settings (don't edit) - `curvenote.yml` - Your project-specific settings (edit this) The base file includes our standard abbreviations, lab affiliation, and citation style. You only need to focus on your project's title, authors, and keywords. ``` -------------------------------- ### Initialize Curvenote Project Source: https://github.com/curvenote/docs/blob/main/content/publish/cli-commands.md Use `curvenote init` to start a new Curvenote project. It supports interactive setup from local folders, GitHub templates, or existing Curvenote projects. Options are available to generate templates, improve existing projects, add authors, and write a table of contents. ```bash curvenote init # Interactive initialization from local folder curvenote init --github # Initialize from GitHub template curvenote init --curvenote # Initialize from Curvenote project curvenote init --write-template # Generate template.yml for template creators curvenote init --improve # Update existing project metadata curvenote init --add-authors # Add authors to existing project ``` ```bash # Initialize from local folder curvenote init ``` ```bash # Clone and initialize from GitHub template curvenote init --github https://github.com/username/template-repo ``` ```bash # Initialize to a specific directory curvenote init --github https://github.com/username/template-repo --output my-project ``` ```bash # Import from Curvenote (non-interactive) curvenote init --curvenote https://curvenote.com/@username/project --yes ``` ```bash # Update metadata on existing project curvenote init --improve ``` ```bash # Generate template.yml for your repository curvenote init --write-template ``` -------------------------------- ### Example: Initialize Rock Scientists Template Source: https://github.com/curvenote/docs/blob/main/content/publish/init-from-github.md This example demonstrates initializing a project from the 'rock-scientists/submission-template' GitHub repository. It shows the interactive prompts for project title, subtitle, authors, rock types, study site, and keywords, culminating in project configuration and server startup. ```bash $ curvenote init --github https://github.com/rock-scientists/submission-template ๐Ÿ”— Initializing from GitHub template... ๐Ÿ“ฅ Cloning repository to submission-template... โœ“ Repository cloned successfully ๐Ÿ“„ Found curvenote.yml ๐Ÿ“– Loading project configuration... โœ“ Project configuration loaded: Rock Scientists Submission Template ๐Ÿ“‹ Customizing your project... Rock Scientists requires specific metadata for submissions. Let's collect that information now. Project title: [e.g., My Research Project] ยป Mineral Composition Analysis of Oceanic Crust Samples Subtitle: [e.g., A concise description] ยป Geochemical analysis from the Mid-Atlantic Ridge Add author(s): [ORCID, GitHub username, or comma-separated list] ยป 0000-0002-5555-6666, 0000-0003-7777-8888 Fetching ORCID 0000-0002-5555-6666... โœ“ Found: Dr. Maria Garcia Affiliation: Institute of Marine Geology Fetching ORCID 0000-0003-7777-8888... โœ“ Found: Dr. Robert Chen Affiliation: Department of Geosciences, Ocean University Primary rock types studied: [e.g., igneous, sedimentary] ยป igneous, basalt, gabbro Study site location: [e.g., Western Pacific] ยป Mid-Atlantic Ridge, 23ยฐN Keywords: [e.g., geochemistry, petrology] ยป geochemistry, petrology, oceanic crust, basalt, mid-ocean ridge โœ“ Project configured successfully! Would you like to start the local server now? (Y/n) ยป y ๐ŸŒŽ Starting local server... ๐Ÿ”Œ Server started on port 3000! ๐Ÿ‘‰ http://localhost:3000 ๐Ÿ‘ˆ ``` -------------------------------- ### Start Local Development Server Source: https://github.com/curvenote/docs/blob/main/content/publish/adding-content.md Run `curvenote start` to build and serve your website locally. This command will incorporate any newly added or updated content and display the changes, including new navigation items and tables of contents. ```shell curvenote start ``` -------------------------------- ### Set Placeholder Text in template.yml Source: https://github.com/curvenote/docs/blob/main/content/publish/creating-templates.md Provide example text in gray to guide users on expected input using the `placeholder` property. ```yaml placeholder: "e.g., Seismic Analysis of Pacific Subduction Zones" ``` -------------------------------- ### Example curvenote.yml Configuration Source: https://github.com/curvenote/docs/blob/main/content/publish/creating-templates.md This is an example of a `curvenote.yml` file that uses `extends` to inherit settings from a base configuration file. ```yaml version: 1 extends: _lab-defaults.yml project: title: Summer 2024 Field Campaign Results description: Analysis of seismic data from Western Pacific authors: - name: Jane Researcher affiliation: smith-lab orcid: 0000-0002-1234-5678 keywords: - earthquake monitoring - field study ``` -------------------------------- ### Local Development with Curvenote CLI Source: https://context7.com/curvenote/docs/llms.txt Start a live-reloading local web server for previewing your site using 'curvenote start', or build the site without serving using 'curvenote build'. Both commands process Markdown and Jupyter Notebook content. ```shell # Start local dev server with live reload (default port 3000) curvenote start # Clean cached content and restart curvenote start -c # Force reinstall web dependencies curvenote start -f # Build without starting server (useful for CI checks) curvenote build # Build with strict error checking โ€” stops on any error curvenote build --strict # Build and check all external links curvenote build --check-links # Build for CI (skip dependency installation, use existing build folder) curvenote build -ci # Write explicit table of contents file curvenote build --write-toc ``` -------------------------------- ### Publish Workflow Example Source: https://github.com/curvenote/docs/blob/main/content/publish/github-actions.md This YAML workflow runs on pull requests to the main branch and uses the curvenote/actions publish workflow. It is configured for a monorepo setup, specifying patterns for submission IDs, enforcing single folders, and setting preview/submit labels, venue, collection, submission kind, and path. ```yaml name: curvenote on: pull_request: branches: ['main'] permissions: contents: read pull-requests: write jobs: publish: uses: curvenote/actions/.github/workflows/publish.yml@v1 with: monorepo: true id-pattern-regex: '^-(?:[a-zA-Z0-9-_]{3,15})$' enforce-single-folder: true preview-label: paper submit-label: true venue: '' collection: '' kind: '' path: papers/* secrets: CURVENOTE: ${{ secrets.CURVENOTE_TOKEN }} GITHUB: ${{ secrets.GITHUB_TOKEN }} ``` -------------------------------- ### Adding Additional Project Metadata Source: https://github.com/curvenote/docs/blob/main/content/publish/init-from-github.md After setting up core project details and authors, you can add keywords and choose whether to start the local server. ```bash Keywords: [e.g., science, research] ยป seismology, tectonics, subduction zones, earthquake analysis โœ“ Project configured successfully! Would you like to start the local server now? (Y/n) ยป y ``` -------------------------------- ### Start Local Development Server Source: https://github.com/curvenote/docs/blob/main/content/publish/cli-commands.md Use `curvenote start` to launch a local server with live reloading. This command is useful for developing and previewing your Curvenote project locally. Flags are available to clean cache, force re-installation, specify a branch, or keep the default host. ```bash curvenote start -c -f --branch main --keep-host ``` -------------------------------- ### Verify Node and npm Installation Source: https://github.com/curvenote/docs/blob/main/content/publish/installing-prerequisites.md After installation, verify that node and npm are available in your system's PATH by running these commands in a new terminal. ```text % node -v v18.18.2 % npm -v v9.8.1 ``` -------------------------------- ### Advanced `any:bundle` Directive Example Source: https://github.com/curvenote/docs/blob/main/content/publish/any-bundle.md An example demonstrating various options for the `any:bundle` directive, including specifying CSS, static files, and custom classes, along with JSON data for the module. ```markdown :::{any:bundle} https://url-to-esm-module/bundle.js :css: https://url-to-css-file/styles.css :static: ./static-files-glob/* :class: w-full class-applied-to-root-div { "height": "600px" } ::: ``` -------------------------------- ### Start a Local Project Build Source: https://github.com/curvenote/docs/blob/main/content/publish/integrity-checks.md Run this command to build your project locally and preview it in a web-based interface. It also outputs any warnings or errors encountered during the build process, which should be resolved before submission. ```bash % curvenote start ``` -------------------------------- ### Install and Verify Curvenote CLI Source: https://context7.com/curvenote/docs/llms.txt Install the Curvenote CLI globally using npm. Ensure Node.js is installed first. For PDF/LaTeX exports, also install the Python 'jtex' package. ```shell # Install Node.js first (https://nodejs.org), then: npm install -g curvenote # Verify installation curvenote --version # Update to latest version npm update -g curvenote # For LaTeX/PDF export support python -m pip install jtex ``` -------------------------------- ### Install Dependencies for PDF Export Source: https://context7.com/curvenote/docs/llms.txt Install the `jtex` Python package and ensure a local LaTeX installation is present for PDF export functionality. ```shell python -m pip install jtex # Also requires a local LaTeX installation: https://www.latex-project.org/get/ ``` -------------------------------- ### Install Node.js using NVM Source: https://github.com/curvenote/docs/blob/main/content/publish/installing-prerequisites.md Install a specific major version of Node.js using Node Version Manager (nvm). NVM will download and set up the latest available version for the specified major release. ```bash % nvm install 18 Downloading and installing node v18... ... Now using node v18 (npm v9) % ``` -------------------------------- ### Install Curvenote CLI Source: https://github.com/curvenote/docs/blob/main/content/publish/cli-overview.md Install the Curvenote CLI globally using npm. Ensure you have Node.js version 14 or greater. ```shell npm install -g curvenote ``` -------------------------------- ### Create and Activate Nodeenv Environment Source: https://github.com/curvenote/docs/blob/main/content/publish/installing-prerequisites.md Create a new Node.js environment using a specific version and activate it. Verify the installation afterwards. ```shell % nodeenv -n 16.15.0 node_env % . node_env/bin/activate (node_env) % node -v (node_env) % v16.15.0 (node_env) % npm -v (node_env) % v8.5.5 ``` -------------------------------- ### Initialize Project from GitHub Template into Current Directory Source: https://github.com/curvenote/docs/blob/main/content/publish/init-from-github.md Clone a GitHub repository as a project template directly into the current directory by setting the output path to '.'. This is a common way to start a new project in an existing folder. ```bash curvenote init --github https://github.com/username/template --output . ``` -------------------------------- ### List Available Node Versions with Nodeenv Source: https://github.com/curvenote/docs/blob/main/content/publish/installing-prerequisites.md Query the available Node.js versions that can be installed using nodeenv. ```python % nodeenv --list % ... 16.15.0 ... ``` -------------------------------- ### Install Node.js using Conda/Mamba Source: https://github.com/curvenote/docs/blob/main/content/publish/installing-prerequisites.md Install a specific even-numbered version of Node.js using conda-forge. Adjust the version range as needed. ```python (my-conda-env)% conda install -c conda-forge 'nodejs>=18,<19' (my-conda-env)% node -v (my-conda-env)% v16.14.2 (my-conda-env)% npm -v (my-conda-env)% v ``` -------------------------------- ### Check Curvenote CLI Version Source: https://github.com/curvenote/docs/blob/main/content/publish/installing.md Verifies the installation of the Curvenote CLI by displaying its current version. This command should work after a successful global installation. ```shell curvenote --version ``` -------------------------------- ### Complete Lab Template Defaults (`_lab-defaults.yml`) Source: https://github.com/curvenote/docs/blob/main/content/publish/creating-templates.md An example of a base configuration file for a research lab template, including venue, subject, affiliations, and options. ```yaml # _lab-defaults.yml version: 1 project: venue: Smith Lab Internal Reports subject: Seismology github: https://github.com/smith-lab bibliography: - references.bib - _lab-common-refs.bib abbreviations: PGA: Peak Ground Acceleration GMM: Ground Motion Model PSHA: Probabilistic Seismic Hazard Analysis affiliations: - id: smith-lab institution: Smith Geophysics Research Lab department: Earth Sciences address: State University, 123 Campus Drive url: https://smithlab.edu options: numbering: heading_1: true heading_2: true ``` -------------------------------- ### Template Directory Structure Source: https://github.com/curvenote/docs/blob/main/content/publish/creating-templates.md An example of the file and directory structure for a Curvenote template repository. ```tree my-lab-template/ โ”œโ”€โ”€ _lab-defaults.yml # Base configuration (extends from this) โ”œโ”€โ”€ _lab-common-refs.bib # Shared references โ”œโ”€โ”€ curvenote.yml # Main config (extends _lab-defaults.yml) โ”œโ”€โ”€ template.yml # Custom questions โ”œโ”€โ”€ README.md # Documentation โ””โ”€โ”€ content/ โ””โ”€โ”€ example.md ``` -------------------------------- ### Check NVM Version Source: https://github.com/curvenote/docs/blob/main/content/publish/installing-prerequisites.md Verify the installation of Node Version Manager (nvm) by checking its version. ```shell % nvm -v 0.39.1 ``` -------------------------------- ### Minimal ESM Module for `any:bundle` Source: https://github.com/curvenote/docs/blob/main/content/publish/any-bundle.md A basic example of an ESM module implementing the `any:bundle` interface, showing `initialize` and `render` entrypoints. The `render` function appends a custom viewer to the provided element. ```typescript export default { async initialize({ model}) { return () => {}; }, async render({ model, el }) { const height = model.get("height"); let div = document.createElement('div'); Object.assign(div.style, { height: height ?? '500px', backgroundColor: 'black', }); // hard code closed for now let viewer = await (new MyCustomViewer()); viewer.display(); el.appendChild(div); return () => viewer.destory?.(); }, }; ``` -------------------------------- ### Basic Markdown Formatting Examples Source: https://github.com/curvenote/docs/blob/main/content/write/markdown-accelerators.md Demonstrates common Markdown syntax for text formatting, including bold, italic, and strikethrough. These can also be applied using keyboard shortcuts or the editing toolbar. ```markdown **Bold** __Bold__ ``` ```markdown *Italic* _Italic_ ``` ```markdown ~~Strikethrough~~ ``` -------------------------------- ### Clone Blog Template Source: https://github.com/curvenote/docs/blob/main/content/publish/tutorial-deploy-local.md Clone the Curvenote blog template repository to start building your site locally. This command downloads the template files and then changes the directory into the newly created 'blog' folder. ```shell % git clone https://github.com/curvenote/docs-blog-template blog Cloning into 'blog'... remote: Enumerating objects: 60, done. remote: Counting objects: 100% (6/6), done. remote: Compressing objects: 100% (4/4), done. remote: Total 60 (delta 0), reused 4 (delta 0), pack-reused 54 Receiving objects: 100% (60/60), 20.30 MiB | 9.82 MiB/s, done. Resolving deltas: 100% (18/18), done. % cd blog ``` -------------------------------- ### Create and Navigate to Project Directory Source: https://github.com/curvenote/docs/blob/main/content/publish/tutorial-deploy-project.md Use these commands to create a new directory for your project and change into it. ```shell mkdir myproject cd myproject ``` -------------------------------- ### Install Nodeenv using pip Source: https://github.com/curvenote/docs/blob/main/content/publish/installing-prerequisites.md Install the nodeenv package, which allows managing Node.js installations within Python virtual environments. ```python % pip install nodeenv ``` -------------------------------- ### Initialize Project from GitHub Template to Specific Directory Source: https://github.com/curvenote/docs/blob/main/content/publish/init-from-github.md Clone a GitHub repository as a project template into a specified output directory using the `--github` and `--output` flags. This is useful for organizing projects or when cloning into a non-empty directory. ```bash curvenote init --github https://github.com/username/template --output my-project ``` -------------------------------- ### Initialize Git and Commit Template Source: https://github.com/curvenote/docs/blob/main/content/publish/creating-templates.md Initialize a Git repository, add all template files, and make an initial commit. This is the first step before pushing to a remote repository. ```bash # 1. Initialize git if not already done $ git init $ git add . $ git commit -m "Initial template" ``` -------------------------------- ### Initialize Project from GitHub Template Source: https://github.com/curvenote/docs/blob/main/content/publish/init-from-github.md Use this command to clone a GitHub repository and initialize a new Curvenote project based on its template structure. ```bash curvenote init --github https://github.com/username/template-repo ``` -------------------------------- ### Install jtex for LaTeX/PDF Exports Source: https://github.com/curvenote/docs/blob/main/content/publish/installing.md Installs the jtex Python package using pip, which is required for LaTeX and PDF exports with Curvenote. Requires Python 3.7 or greater. ```shell python -m pip install jtex ``` -------------------------------- ### Rock Scientists Journal Template Example Source: https://github.com/curvenote/docs/blob/main/content/publish/creating-templates.md A complete `template.yml` example for a geoscience journal, collecting specific metadata like title, abstract, authors, keywords, and funding. ```yaml name: curvenote init version: 1 questions: - id: title field: project.title enabled: true type: text message: "Article title:" placeholder: "e.g., Mineral Composition Analysis of Oceanic Crust Samples" hint: "Use a descriptive title that clearly indicates your research focus" required: true - id: abstract field: project.description enabled: true type: text message: "Abstract:" placeholder: "A concise summary of your research and findings" hint: "Keep to 250 words or less. This will be used for article listings." required: true - id: authors field: project.authors enabled: true type: people message: "Author(s):" placeholder: "ORCID, GitHub username, or comma-separated list" hint: "Rock Scientists requires ORCID for all authors. Add authors in order of contribution." required: true - id: keywords field: project.keywords enabled: true type: list message: "Keywords:" placeholder: "e.g., geochemistry, petrology, mineralogy, tectonics" hint: "5-10 keywords for discoverability. Use terms from GSA Thesaurus when possible." required: true - id: funding field: project.funding enabled: true type: text message: "Primary funding source:" placeholder: "e.g., NSF Grant EAR-1234567" hint: "Include grant numbers if applicable" required: false # Omit subtitle as it's not used in Rock Scientists format # - id: subtitle ``` -------------------------------- ### Initialize Curvenote Project Source: https://context7.com/curvenote/docs/llms.txt Initialize a new Curvenote project from a local folder, GitHub template, or existing Curvenote project. This command generates a 'curvenote.yml' configuration file. ```shell # Interactive init from existing local folder/git repo curvenote init # Initialize from a GitHub template repository curvenote init --github https://github.com/curvenote/docs-blog-template --output my-blog # Import from an existing Curvenote project (non-interactive) curvenote init --curvenote https://curvenote.com/@username/project --yes # Update metadata on an existing project curvenote init --improve # Add authors to an existing project curvenote init --add-authors # Generate a template.yml for template creators curvenote init --write-template ``` -------------------------------- ### Main `curvenote.yml` Using `extends` Source: https://github.com/curvenote/docs/blob/main/content/publish/creating-templates.md References a base configuration file using `extends` to create a cleaner, project-specific `curvenote.yml`. ```yaml # curvenote.yml version: 1 extends: _curvenote-base.yml project: title: My Research Project authors: [] keywords: [] ``` -------------------------------- ### Add Default Action to Site Source: https://github.com/curvenote/docs/blob/main/content/publish/article-actions.md This is the default configuration for a single 'Learn More' action. Customize the `title` and `url` to change its behavior. ```yaml version: 1 site: actions: - title: Learn More url: https://docs.curvenote.com/web ``` -------------------------------- ### Curvenote Initialization Command Source: https://github.com/curvenote/docs/blob/main/content/publish/creating-templates.md Command to initialize a new project from a Curvenote GitHub template. ```bash curvenote init --github https://github.com/rock-scientists/submission-template ``` -------------------------------- ### Initialize Project from GitHub Template in Non-Interactive Mode Source: https://github.com/curvenote/docs/blob/main/content/publish/init-from-github.md Use the `--yes` flag with `curvenote init --github` to perform initialization in non-interactive mode. This is ideal for automation and scripts, as it accepts default values and skips optional prompts. ```bash curvenote init --github https://github.com/username/template --yes ``` -------------------------------- ### Deploy Site with Curvenote CLI Source: https://context7.com/curvenote/docs/llms.txt Deploy the built site to curve.space hosting or a custom domain configured in 'curvenote.yml'. Use '-y' to skip the confirmation prompt and '-ci' for CI mode. ```shell # Deploy interactively (prompts for confirmation) curvenote deploy # Deploy without confirmation prompt curvenote deploy -y # Deploy in CI mode (skip dependency installation) curvenote deploy -ci ``` -------------------------------- ### Basic Template Repository Structure Source: https://github.com/curvenote/docs/blob/main/content/publish/creating-templates.md A minimal Curvenote template repository includes configuration files, documentation, and example content. ```yaml my-template/ โ”œโ”€โ”€ curvenote.yml # Project configuration (YAML) โ”œโ”€โ”€ template.yml # Custom initialization questions (optional YAML) โ”œโ”€โ”€ README.md # Template documentation (Markdown) โ”œโ”€โ”€ index.md # Landing page โ”œโ”€โ”€ example-article.md # Example content โ”œโ”€โ”€ references.bib # Bibliography (optional) โ””โ”€โ”€ images/ # Image assets โ””โ”€โ”€ logo.svg ``` -------------------------------- ### Build Jupyter Book Locally Source: https://github.com/curvenote/docs/blob/main/content/write/export-cli-jupyter-book.md Once the Jupyter Book files are exported, navigate to the root directory of the exported project and use this command to build the book into HTML. The output will be in the `_build/html` directory. ```bash jupyter-book build . ``` -------------------------------- ### Define a Generic Variable Source: https://github.com/curvenote/docs/blob/main/content/write/explorable-explanations.md A basic example of defining a variable with a name, initial value, and format. This serves as a template for creating other variables. ```markdown ```{r:var} :name: "variable" :value: "0" :format: ".0f" ``` ``` -------------------------------- ### BibTeX Citation Entry Source: https://context7.com/curvenote/docs/llms.txt Example of a BibTeX entry for a journal article, including title, authors, journal, and DOI. This format is used for importing references into Curvenote. ```bibtex @article{Cockett2015SimPEG, title = {SimPEG: An open source framework for simulation and gradient based parameter estimation in geophysical applications}, author = {Cockett, Rowan and Kang, Seogi and Heagy, Lindsey J and Pidlisecky, Adam and Oldenburg, Douglas W}, journal = {Computers \& Geosciences}, year = {2015}, doi = {10.1016/j.cageo.2015.09.015} } ``` -------------------------------- ### Deploy Project Command Source: https://github.com/curvenote/docs/blob/main/content/publish/tutorial-deploy-project.md Use this command to deploy your local Curvenote project to a live URL. Ensure you stop the local web server first. ```text % curvenote deploy ? Deploy local content to "https://your.curve.space"? (y/N) ``` ```text โ˜๏ธ Uploading 27 files โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 100% | ETA: 0s | 27/27 โ˜๏ธ Uploaded 27 files in 3.64 s. ๐Ÿš€ Deployed 27 files in 2.08 s. ๐Ÿ•ธ Site Deployed ๐ŸŒŽ https://your.curve.space ``` -------------------------------- ### Configure Large Datasets in curvenote.yml Source: https://github.com/curvenote/docs/blob/main/content/publish/large-scale-data.md Define large datasets with DOIs in the curvenote.yml file for pre-fetching during build or container setup. This ensures data availability before article execution. ```yaml project: ... requirements: - environment.yml resources: - some_resource_file.csv - url: https://doi.org/123456.qwerty file: data/local_path_my_notebooks_expect.hd5 ``` -------------------------------- ### Configure Project for Computation Source: https://github.com/curvenote/docs/blob/main/content/publish/live-compute.md Add this frontmatter to your `curvenote.yml` or `myst.yml` to enable computation, specify exports, and define requirements and resources for your submission. ```yaml version: 1 project: ... jupyter: true exports: - format: meca requirements: - requirements.txt - apt.txt resources: - src/**/* - example.csv - model.pkl ``` -------------------------------- ### List Collections Directive Source: https://github.com/curvenote/docs/blob/main/content/publish/cards.md Use the `cn:collections` directive to display a list of collections available on a site. This example lists collections for the 'my-journal' venue, excluding any collection tagged as 'archive'. ```markdown ```{cn:collections} :venue: my-journal :exclude: archive ``` ``` -------------------------------- ### Export Article to PDF via CLI Source: https://context7.com/curvenote/docs/llms.txt Export a Curvenote article to PDF using the `curvenote export pdf` command with a specified template. Requires the `jtex` Python package and a LaTeX installation. ```shell curvenote export pdf my-article.md --template arxiv_two_column ``` -------------------------------- ### Transform Bluesky Profile Links Source: https://github.com/curvenote/docs/blob/main/content/publish/myst-extensions.md Curvenote automatically transforms links to Bluesky profiles into rich cards or hover previews. This example shows how to link to a profile using a standard URL format. ```myst Check out [Curvenote on Bluesky](https://bsky.app/profile/curvenote.com) for updates. ``` -------------------------------- ### Deploy Site Locally Source: https://github.com/curvenote/docs/blob/main/content/publish/tutorial-deploy-local.md Use the `curvenote deploy` command to upload your local content to your Curvenote site. Confirm the deployment when prompted. ```text % curvenote deploy ? Deploy local content to "https://your.curve.space"? (y/N) ``` ```text โ˜๏ธ Uploading 27 files โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 100% | ETA: 0s | 27/27 โ˜๏ธ Uploaded 27 files in 3.64 s. ๐Ÿš€ Deployed 27 files in 2.08 s. ๐Ÿ•ธ Site Deployed ๐ŸŒŽ https://your.curve.space ``` -------------------------------- ### Add Multiple Actions to Site Source: https://github.com/curvenote/docs/blob/main/content/publish/article-actions.md Add more actions by including additional items in the `actions:` list. Each item requires its own `title` and `url`. ```yaml version: 1 site: actions: - title: GitHub url: https://gihub.com/curvenote - title: Sign Up url: https://curvenote.com/signup ``` -------------------------------- ### Binder/JupyterHub Launch Integration Frontmatter Source: https://context7.com/curvenote/docs/llms.txt Include this YAML frontmatter in your article to enable Binder or JupyterHub to launch your content. Specify the GitHub repository, branch, or tag for the Binder environment. ```yaml --- title: Tilt-Corrected BF-STEM Analysis kernelspec: name: python3 display_name: Python 3 jupyter: binder: repo: github/myorg/myrepo ref: main --- ``` -------------------------------- ### Improve Project Metadata Interactively Source: https://github.com/curvenote/docs/blob/main/content/publish/creating-templates.md Run `curvenote init --improve` to re-ask template questions and update existing project metadata. This workflow allows users to review and modify current values before saving changes. ```bash # User clones your template and starts writing $ curvenote init --github https://github.com/rock-scientists/template # ... answers basic questions ... # ... focuses on writing the article ... # Later, before submission, they complete metadata $ curvenote init --improve ๐Ÿ”„ Improving existing project configuration... Article title: Seismic Analysis of Western Pacific ยป [Press Enter to keep, or type new value] Abstract: Initial study of seismic patterns ยป Comprehensive analysis of earthquake distribution in the Western Pacific subduction zone using 15 years of seismological data Author(s): Dr. Jane Smith ยป Dr. Jane Smith, github:collaborator, 0000-0003-9999-8888 Keeping: Dr. Jane Smith Fetching GitHub user collaborator... โœ“ Found: John Collaborator Fetching ORCID 0000-0003-9999-8888... โœ“ Found: Dr. Maria Garcia Rock types studied: ยป basalt, oceanic crust, sedimentary deposits Study location: Western Pacific ยป Western Pacific Subduction Zone, 145ยฐE, 20-35ยฐN Keywords: seismology, earthquakes ยป seismology, earthquakes, subduction zones, tectonics, geohazards ๐Ÿ“‹ Summary of changes: โ€ข abstract: Extended with more detail โ€ข authors: Added John Collaborator, Dr. Maria Garcia โ€ข rock_types: Added new field with ["basalt", "oceanic crust", "sedimentary deposits"] โ€ข study_location: More specific coordinates โ€ข keywords: Added "subduction zones, tectonics, geohazards" Save these changes to curvenote.yml? (Y/n) ยป y โœ… Project configuration updated successfully! ```