├── .npmrc ├── docs ├── showcase │ └── index.md ├── favicon-180x180.png ├── changelogs │ ├── nacara.md │ ├── nacara-core.md │ ├── nacara-apigen.md │ └── nacara-layout-standard.md ├── assets │ └── changelog │ │ └── 0_2_0 │ │ ├── touch_preview.gif │ │ └── desktop_preview.png ├── nacara-layout-standard │ ├── menu.json │ ├── introduction.md │ ├── partials.md │ ├── layouts.md │ ├── scss-sass-variables.md │ └── markdown-features.md ├── nacara │ ├── advanced │ │ ├── layout-from-scratch.md │ │ └── custom-layout-fsharp.md │ ├── guides │ │ ├── create-a-section.md │ │ ├── deploy-your-site.md │ │ ├── literate-files.md │ │ ├── customize-the-style.md │ │ ├── create-a-page.md │ │ └── section-menu.md │ ├── introduction.md │ ├── menu.json │ ├── partials.md │ ├── cli-usage.md │ └── directory-structure.md ├── _partials │ └── footer.jsx ├── nacara-apigen │ └── introduction.md ├── style.scss └── index.md ├── babel.config.json ├── global.json ├── src ├── Nacara.Create │ ├── templates │ │ ├── babel.config.json │ │ ├── gitignore │ │ ├── docs │ │ │ ├── documentation │ │ │ │ ├── introduction.md │ │ │ │ ├── menu.json │ │ │ │ └── guides │ │ │ │ │ ├── deploy-your-site.md │ │ │ │ │ ├── customize-the-style.md │ │ │ │ │ ├── create-a-page.md │ │ │ │ │ └── create-a-section.md │ │ │ ├── _partials │ │ │ │ └── footer.jsx │ │ │ ├── index.md │ │ │ └── style.scss │ │ ├── package.json │ │ └── style.scss │ ├── package.json │ ├── CHANGELOG.md │ └── index.js ├── Nacara.Layout.Standard │ ├── scss │ │ ├── adapters │ │ │ ├── _all.scss │ │ │ └── bulma │ │ │ │ ├── button.scss │ │ │ │ └── content.scss │ │ ├── components │ │ │ ├── _all.scss │ │ │ ├── page-header.scss │ │ │ ├── copy-buttons.scss │ │ │ ├── textual-steps.scss │ │ │ ├── anchors.scss │ │ │ ├── mobile-menu.scss │ │ │ ├── navigation-button.scss │ │ │ ├── menu.scss │ │ │ └── changelog.scss │ │ ├── nacara.scss │ │ └── nacara-api.scss │ ├── Source │ │ ├── Dependencies.fs │ │ ├── paket.references │ │ ├── Nacara.Layouts.Standard.fsproj │ │ ├── Helpers.fs │ │ ├── TableOfContentParser.fs │ │ └── Export.fs │ ├── package.json │ ├── js │ │ └── remark-block-container.js │ └── CHANGELOG.md ├── Nacara.ApiGen │ ├── Tests │ │ ├── paket.references │ │ ├── Main.fs │ │ └── Nacara.ApiGen.Tests.fsproj │ ├── Source │ │ ├── paket.references │ │ ├── File.fs │ │ ├── StringBuilder.fs │ │ ├── Helpers.fs │ │ ├── Nacara.ApiGen.fsproj │ │ ├── Generate.fs │ │ └── Main.fs │ └── CHANGELOG.md ├── Nacara │ ├── js │ │ ├── afterClean-options.js │ │ ├── version.js │ │ └── nodemon-watch.js │ ├── Source │ │ ├── paket.references │ │ ├── Clean.fs │ │ ├── Version.fs │ │ ├── Serve.fs │ │ ├── Nacara.fsproj │ │ ├── Layout.fs │ │ ├── Partial.fs │ │ ├── FsharpFileParser.fs │ │ ├── Write.fs │ │ └── Build.fs │ ├── package.json │ ├── cli.js │ └── scripts │ │ └── live-reload.js └── Nacara.Core │ ├── paket.references │ ├── Bindings │ ├── Semver.fs │ ├── FrontMatter.fs │ ├── Sass.fs │ └── Chokidar.fs │ ├── Array.Extensions.fs │ ├── List.Extensions.fs │ ├── Nacara.Core.fsproj │ ├── Interop.fs │ ├── Log.fs │ ├── Navbar.fs │ ├── Menu.fs │ └── CHANGELOG.md ├── .docker └── Dockerfile ├── NuGet.Config ├── .config └── dotnet-tools.json ├── .editorconfig ├── .gitpod.yml ├── LICENSE.txt ├── .github └── workflows │ ├── ci.yml │ └── publish.yml ├── .gitattributes ├── package.json ├── BACKERS.md ├── paket.dependencies ├── .vscode ├── tasks.json └── launch.json ├── scripts ├── release-npm.js ├── release-nuget.js └── release-core.js ├── Directory.Build.props ├── README.md ├── Makefile ├── nacara.config.json ├── .gitignore └── Nacara.sln /.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /docs/showcase/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: navbar-only 3 | --- 4 | 5 | TODO showcase 6 | -------------------------------------------------------------------------------- /babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-react" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /docs/favicon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MangelMaxime/Nacara/HEAD/docs/favicon-180x180.png -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "version": "6.0.0", 4 | "rollForward": "latestMinor" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/Nacara.Create/templates/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-react" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /docs/changelogs/nacara.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: changelog 3 | title: Nacara 4 | changelog_path: ./../../src/Nacara/CHANGELOG.md 5 | --- 6 | -------------------------------------------------------------------------------- /docs/assets/changelog/0_2_0/touch_preview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MangelMaxime/Nacara/HEAD/docs/assets/changelog/0_2_0/touch_preview.gif -------------------------------------------------------------------------------- /docs/changelogs/nacara-core.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: changelog 3 | title: Nacara.Core 4 | changelog_path: ./../../src/Nacara.Core/CHANGELOG.md 5 | --- 6 | -------------------------------------------------------------------------------- /src/Nacara.Layout.Standard/scss/adapters/_all.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | @import "./bulma/button.scss"; 4 | @import "./bulma/content.scss"; 5 | -------------------------------------------------------------------------------- /docs/assets/changelog/0_2_0/desktop_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MangelMaxime/Nacara/HEAD/docs/assets/changelog/0_2_0/desktop_preview.png -------------------------------------------------------------------------------- /src/Nacara.ApiGen/Tests/paket.references: -------------------------------------------------------------------------------- 1 | group ApiGen 2 | FSharp.Core 3 | FSharp.Formatting 4 | FSharp.Compiler.Service 5 | Expecto 6 | -------------------------------------------------------------------------------- /docs/changelogs/nacara-apigen.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: changelog 3 | title: Nacara.ApiGen 4 | changelog_path: ./../../src/Nacara.ApiGen/CHANGELOG.md 5 | --- 6 | -------------------------------------------------------------------------------- /src/Nacara.Layout.Standard/Source/Dependencies.fs: -------------------------------------------------------------------------------- 1 | module Dependencies 2 | 3 | [] 4 | let menu = "resources/nacara-standard-layouts/scripts/menu.js" 5 | -------------------------------------------------------------------------------- /src/Nacara.ApiGen/Source/paket.references: -------------------------------------------------------------------------------- 1 | group ApiGen 2 | FSharp.Core 3 | FSharp.Formatting 4 | FSharp.Compiler.Service 5 | Argu 6 | FSlugify 7 | -------------------------------------------------------------------------------- /docs/changelogs/nacara-layout-standard.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: changelog 3 | title: Nacara.Standard.Layout 4 | changelog_path: ./../../src/Nacara.Layout.Standard/CHANGELOG.md 5 | --- 6 | -------------------------------------------------------------------------------- /src/Nacara.Create/templates/gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | /node_modules 3 | 4 | # Production 5 | docs_deploy/ 6 | .nacara/ 7 | 8 | npm-debug.log* 9 | yarn-debug.log* 10 | yarn-error.log* 11 | -------------------------------------------------------------------------------- /src/Nacara/js/afterClean-options.js: -------------------------------------------------------------------------------- 1 | export default { 2 | description: "Command to run after Nacara cleaned the output folder. Please, make sure to wrap the command between quotes", 3 | type: "string" 4 | } 5 | -------------------------------------------------------------------------------- /src/Nacara.Core/paket.references: -------------------------------------------------------------------------------- 1 | Fable.Core 2 | Fable.FontAwesome 3 | Fable.FontAwesome.Free 4 | Fable.Node 5 | Fable.Promise 6 | Glutinum.Chalk 7 | Thoth.Json 8 | FSharp.Core 9 | Microsoft.SourceLink.GitHub 10 | -------------------------------------------------------------------------------- /src/Nacara.Layout.Standard/scss/adapters/bulma/button.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | button { 4 | &.is-copy-button { 5 | position: absolute; 6 | top: 1rem; 7 | right: 1rem; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Nacara/Source/paket.references: -------------------------------------------------------------------------------- 1 | Fable.Core 2 | Fable.Elmish 3 | Fable.FontAwesome 4 | Fable.FontAwesome.Free 5 | Fable.Node 6 | Fable.Promise 7 | Glutinum.Chalk 8 | Glutinum.Express 9 | Thoth.Json 10 | FSharp.Core 11 | -------------------------------------------------------------------------------- /src/Nacara/js/version.js: -------------------------------------------------------------------------------- 1 | import { readFile } from 'fs/promises' 2 | 3 | export default async function() { 4 | const pkg = JSON.parse(await readFile(new URL('./../package.json', import.meta.url))); 5 | 6 | return pkg.version; 7 | } 8 | -------------------------------------------------------------------------------- /src/Nacara.Layout.Standard/Source/paket.references: -------------------------------------------------------------------------------- 1 | Fable.Core 2 | Fable.Date 3 | Fable.FontAwesome 4 | Fable.FontAwesome.Free 5 | Fable.Node 6 | Fable.Promise 7 | Feliz 8 | Feliz.Bulma 9 | Glutinum.Chalk 10 | Thoth.Json 11 | FSharp.Core 12 | -------------------------------------------------------------------------------- /src/Nacara.Core/Bindings/Semver.fs: -------------------------------------------------------------------------------- 1 | module rec Semver 2 | 3 | open Fable.Core 4 | open Fable.Core.JsInterop 5 | 6 | let semver : IExport = import "default" "semver" 7 | 8 | type IExport = 9 | abstract gte : v1 : string * v2 : string -> bool 10 | -------------------------------------------------------------------------------- /src/Nacara.ApiGen/Tests/Main.fs: -------------------------------------------------------------------------------- 1 | module Main 2 | 3 | open Expecto 4 | 5 | let tests = 6 | testList "All" [ 7 | Tests.CommentFormatter.tests 8 | ] 9 | 10 | [] 11 | let main args = 12 | runTestsWithCLIArgs [] args tests 13 | -------------------------------------------------------------------------------- /docs/nacara-layout-standard/menu.json: -------------------------------------------------------------------------------- 1 | [ 2 | "nacara-layout-standard/introduction", 3 | "nacara-layout-standard/layouts", 4 | "nacara-layout-standard/partials", 5 | "nacara-layout-standard/markdown-features", 6 | "nacara-layout-standard/scss-sass-variables" 7 | ] 8 | -------------------------------------------------------------------------------- /src/Nacara/Source/Clean.fs: -------------------------------------------------------------------------------- 1 | module Clean 2 | 3 | open Nacara.Core.Types 4 | open Node 5 | 6 | let clean (config : Config) = 7 | promise { 8 | do! Directory.rmdir (path.join(config.WorkingDirectory, ".nacara")) 9 | do! Directory.rmdir config.DestinationFolder 10 | } 11 | -------------------------------------------------------------------------------- /.docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM gitpod/workspace-dotnet:latest 2 | 3 | USER gitpod 4 | 5 | # Install & use custom Node.js version 6 | ENV NODE_VERSION=14 7 | RUN bash -c ". .nvm/nvm.sh && \ 8 | nvm install ${NODE_VERSION} && \ 9 | nvm alias default ${NODE_VERSION}" 10 | 11 | RUN npm i -g npm@7 12 | -------------------------------------------------------------------------------- /NuGet.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.config/dotnet-tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "isRoot": true, 4 | "tools": { 5 | "fable": { 6 | "version": "3.4.9", 7 | "commands": [ 8 | "fable" 9 | ] 10 | }, 11 | "paket": { 12 | "version": "6.1.3", 13 | "commands": [ 14 | "paket" 15 | ] 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Nacara/Source/Version.fs: -------------------------------------------------------------------------------- 1 | module Version 2 | 3 | open Fable.Core 4 | open Fable.Core.JsInterop 5 | 6 | let getVersion () : JS.Promise = 7 | import "default" "./../js/version.js" 8 | 9 | let version () = 10 | promise { 11 | let! version = getVersion () 12 | 13 | Log.log $"Nacara version: {version}" 14 | } 15 | -------------------------------------------------------------------------------- /src/Nacara.Create/templates/docs/documentation/introduction.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction 3 | layout: standard 4 | --- 5 | 6 | This is a quick tutorial on how to use Nacara to build your site. 7 | 8 | ## Live edit 9 | 10 | Open `docs/documentation/introduction.md` and edit some lines. 11 | 12 | You should see the site reload automatically with your changes applied 13 | -------------------------------------------------------------------------------- /src/Nacara.Layout.Standard/scss/components/_all.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | @import './changelog.scss'; 4 | @import './textual-steps.scss'; 5 | @import './navigation-button.scss'; 6 | @import './nacara-navbar.scss'; 7 | @import './anchors.scss'; 8 | @import './mobile-menu.scss'; 9 | @import './copy-buttons.scss'; 10 | @import './menu.scss'; 11 | @import './page-header.scss'; 12 | -------------------------------------------------------------------------------- /src/Nacara/Source/Serve.fs: -------------------------------------------------------------------------------- 1 | module Serve 2 | 3 | open Nacara.Core.Types 4 | 5 | let serve (config : Config) = 6 | promise { 7 | let server = Server.create config 8 | 9 | server.listen(config.ServerPort, fun () -> 10 | Log.success $"Serving {config.SourceFolder} at: http://localhost:%i{config.ServerPort}" 11 | ) 12 | |> ignore 13 | } 14 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | insert_final_newline = true 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | indent_style = space 12 | indent_size = 4 13 | 14 | [Makefile] 15 | indent_style = tab 16 | 17 | [*.yml] 18 | indent_size = 2 -------------------------------------------------------------------------------- /src/Nacara.Create/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "create-nacara", 3 | "version": "1.1.0", 4 | "description": "", 5 | "main": "index.js", 6 | "bin": "index.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "chalk": "^4.1.2", 14 | "enquirer": "^2.3.6", 15 | "shelljs": "^0.8.4" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Nacara.Create/templates/docs/_partials/footer.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const year = new Date().getFullYear(); 4 | 5 | export default ( 6 |
7 |

8 | Copyright © {year} - Built with Nacara 9 |

10 |
11 | ) 12 | -------------------------------------------------------------------------------- /src/Nacara.Create/templates/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.0", 3 | "private": true, 4 | "type": "module", 5 | "engines": { 6 | "node": "^12.20.0 || ^14.13.1 || >=16.0.0", 7 | "npm": ">=7.0.0" 8 | }, 9 | "scripts": { 10 | "build": "nacara build", 11 | "clean": "nacara clean", 12 | "watch": "nacara watch", 13 | "serve": "nacara serve" 14 | }, 15 | "dependencies": {} 16 | } 17 | -------------------------------------------------------------------------------- /src/Nacara.Layout.Standard/scss/components/page-header.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | .page-header { 4 | min-height: 1em; 5 | margin-bottom: 1em; 6 | 7 | h1 { 8 | margin-top: 0 !important; 9 | margin-bottom: 1em; 10 | } 11 | 12 | .breadcrumb { 13 | ul { 14 | margin-left: 0; 15 | margin-top: 0; 16 | } 17 | 18 | li { 19 | height: $navbar-height; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Nacara.ApiGen/Source/File.fs: -------------------------------------------------------------------------------- 1 | module File 2 | 3 | open System.IO 4 | open System.Text 5 | 6 | let write 7 | (docsRoot : string) 8 | (fileName : string) 9 | (sb : StringBuilder) = 10 | 11 | let filePath = Path.Combine(docsRoot, fileName) 12 | 13 | // Ensure that the directory exists 14 | Directory.CreateDirectory(Path.GetDirectoryName(filePath)) 15 | |> ignore 16 | 17 | use file = new StreamWriter(filePath) 18 | file.Write(sb.ToString()) 19 | -------------------------------------------------------------------------------- /src/Nacara.ApiGen/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to this project will be documented in this file. 3 | 4 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 5 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 6 | 7 | ## Unreleased 8 | 9 | ### Changed 10 | 11 | * Upgrade FSharp.Formatting to latest version 12 | 13 | ## 1.0.0-beta-001 - 2021-10-28 14 | 15 | ### Added 16 | 17 | * Initial release 18 | -------------------------------------------------------------------------------- /src/Nacara.Core/Bindings/FrontMatter.fs: -------------------------------------------------------------------------------- 1 | module FrontMatter 2 | 3 | open Fable.Core 4 | 5 | type [] FrontMatterResult<'T> = 6 | abstract attributes: 'T 7 | abstract body: string 8 | abstract frontmatter: string option 9 | 10 | type [] FM = 11 | [] abstract Invoke<'T> : file: string -> FrontMatterResult<'T> 12 | abstract test: file: string -> bool 13 | 14 | let [] fm: FM = jsNative 15 | -------------------------------------------------------------------------------- /.gitpod.yml: -------------------------------------------------------------------------------- 1 | image: 2 | file: .docker/Dockerfile 3 | 4 | ports: 5 | - port: 8080 6 | 7 | tasks: 8 | - init: npm install 9 | 10 | github: 11 | prebuilds: 12 | # enable for pull requests coming from forks (defaults to false) 13 | pullRequestsFromForks: true 14 | # add a "Review in Gitpod" button as a comment to pull requests (defaults to false) 15 | addComment: true 16 | 17 | vscode: 18 | extensions: 19 | - christian-kohler.path-intellisense 20 | - mrmlnc.vscode-scss 21 | - Ionide.Ionide-fsharp 22 | -------------------------------------------------------------------------------- /docs/nacara-layout-standard/introduction.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction 3 | layout: standard 4 | --- 5 | 6 | ## Installation 7 | 8 | `nacara-layout-standard` is the package providing the standard layout when working with Nacara. 9 | 10 | ``` 11 | npm install nacara-layout-standard 12 | ``` 13 | 14 | ## Quick-view 15 | 16 | Here is the list of all the layout available: 17 | 18 | - `nacara-standard`: standard documentation page 19 | - `nacara-navbar-only`: a navbar with a blank canvas 20 | - `nacara-changelog`: for displaying your changelog on your website 21 | -------------------------------------------------------------------------------- /src/Nacara.ApiGen/Tests/Nacara.ApiGen.Tests.fsproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | Exe 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/nacara/advanced/layout-from-scratch.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Overview 3 | layout: standard 4 | --- 5 | 6 | Nacara is extensible, you can write your own layout or re-use existing layout to adapt them to your needs. 7 | 8 | You can use both **F#** and **JavaScript** to do so. 9 | 10 | In general, you should prefer **JavaScript** when adapting an existing layout as it is easier to **interop with the NPM packages**. 11 | 12 | If you want to write a complex layout, you should prefer **F#** as Nacara comes with `Nacara.Core` nuget, which includes all the **types definition** and some **helpers**. 13 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2021 Mangel Maxime 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: 3 | pull_request: 4 | branches: [ master ] 5 | workflow_dispatch: 6 | jobs: 7 | build: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v2 11 | - uses: actions/setup-dotnet@v1 12 | with: 13 | dotnet-version: '6.0.x' 14 | - uses: actions/setup-node@v2 15 | with: 16 | node-version: '14' 17 | - name: Install and use custom npm version 18 | run: npm i -g npm@7 19 | - name: Setup workspace 20 | run: make setup-dev 21 | - name: Build site 22 | run: make generate-docs 23 | -------------------------------------------------------------------------------- /src/Nacara.Create/templates/docs/documentation/menu.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "label": "Overview", 5 | "items": [ 6 | "documentation/introduction" 7 | ] 8 | }, 9 | { 10 | "type": "section", 11 | "label": "Guides", 12 | "items": [ 13 | "documentation/guides/create-a-page", 14 | "documentation/guides/customize-the-style", 15 | "documentation/guides/create-a-section", 16 | "documentation/guides/custom-layout", 17 | "documentation/guides/deploy-your-site" 18 | ] 19 | } 20 | ] 21 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # These files are text and should be normalized (convert crlf to lf) 2 | *.config text eol=lf crlf=input 3 | *.cs text eol=lf crlf=input 4 | *.fs text eol=lf crlf=input 5 | *.fsx text eol=lf crlf=input 6 | *.md text eol=lf crlf=input 7 | *.yml text eol=lf crlf=input 8 | *.sh text eol=lf crlf=input 9 | *.cmd text eol=lf crlf=input 10 | *.csproj text eol=lf crlf=input 11 | *.fsproj text eol=lf crlf=input 12 | *.sln text eol=lf crlf=input 13 | *.js text eol=lf crlf=input 14 | 15 | # These files should be treated as binary 16 | *.png binary 17 | *.jpg binary 18 | *.jpeg binary 19 | *.gif binary 20 | *.ai binary 21 | *.psd binary 22 | $.exe binary 23 | -------------------------------------------------------------------------------- /docs/nacara/guides/create-a-section.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Create a Section 3 | layout: standard 4 | --- 5 | 6 | A section in Nacara helps you organize your website. For example, you can have the following sections: 7 | 8 | - **Documentation**: a place to host your project documentation 9 | - **Blog**: a place to publish blog posts 10 | 11 | ## Create a new section 12 | 13 | A section is defined by creating a folder right under your source folder (default is `docs`). 14 | 15 | If your project has this structure: 16 | 17 | ``` 18 | docs 19 | ├── blog 20 | └── documentation 21 | ``` 22 | 23 | This means that you have two sections called `documentation` and `blog`. 24 | -------------------------------------------------------------------------------- /src/Nacara/js/nodemon-watch.js: -------------------------------------------------------------------------------- 1 | import { runWatch } from '../dist/Main.js'; 2 | import yargs from 'yargs'; 3 | import { hideBin } from "yargs/helpers"; 4 | import afterCleanOptions from './afterClean-options.js'; 5 | 6 | // Yargs to parse the arguments 7 | // We don't need to be complete or strict here because 8 | // arguments have already been check by the cli.js 9 | // Here we re-parse the arguments because we are in a new instance of Nacara 10 | // started from Nodemon 11 | const res = 12 | yargs(hideBin(process.argv)) 13 | .option( 14 | "afterClean", 15 | afterCleanOptions 16 | ) 17 | .argv 18 | 19 | runWatch(res); 20 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nacara-root", 3 | "private": "true", 4 | "license": "Apache-2.0", 5 | "type": "module", 6 | "devDependencies": { 7 | "chalk": "^4.1.2", 8 | "changelog-parser": "^2.8.0", 9 | "concurrently": "^6.2.2", 10 | "nodemon": "^2.0.20", 11 | "shelljs": "^0.8.5" 12 | }, 13 | "engines": { 14 | "node": ">=14.0.0", 15 | "npm": ">=7.0.0" 16 | }, 17 | "dependencies": { 18 | "@babel/preset-react": "^7.14.5", 19 | "bulma": "^0.9.3", 20 | "remark-github": "^11.1.0", 21 | "vscode-theme-onelight": "github:akamud/vscode-theme-onelight" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Nacara.Layout.Standard/scss/adapters/bulma/content.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | .content { 4 | .breadcrumb > ul > li:last-child { 5 | font-weight: $weight-bold; 6 | } 7 | 8 | & li + li { 9 | margin-top: 0; 10 | } 11 | 12 | // Use the same font-size for the table font as for the rest 13 | // I don't know if it is a bug from Bulma or Firefox 14 | .table { 15 | font-size: $body-size; 16 | } 17 | 18 | @include mobile { 19 | th, td { 20 | word-break: break-all; 21 | } 22 | } 23 | 24 | pre { 25 | word-break: break-all; 26 | white-space: break-spaces; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Nacara.Create/templates/docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: navbar-only 3 | --- 4 | 5 |
6 |
7 |
8 |
9 |

10 | My Site 11 |

12 |

13 | Nacara is a static site generator focused on simplicity 14 |

15 | 16 | Quick tutorial 17 | 18 |
19 |
20 |
21 |
22 | -------------------------------------------------------------------------------- /src/Nacara.Layout.Standard/scss/components/copy-buttons.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | // Style relative to the snippet and copy button 4 | pre { 5 | position: relative; // Make the pre relative so the copy button and positioned itself relative to it 6 | padding-top: $size-4 !important; // This padding is to display correctly the button even if the snippet has only 1 line of code 7 | padding-bottom: $size-4 !important; // This padding is to display correctly the button even if the snippet has only 1 line of code 8 | 9 | button.is-copy-button { 10 | visibility: hidden; 11 | } 12 | 13 | &:hover { 14 | button.is-copy-button { 15 | visibility: visible; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /BACKERS.md: -------------------------------------------------------------------------------- 1 |

Sponsors & Backers

2 | 3 | The development of this project is made possible thanks to the support of these awesome sponsors & backers. 4 | 5 | [Become a backer or sponsor on Patreon](https://www.patreon.com/MangelMaxime) 6 | 7 | If you prefer one time donation, you can do it via [Paypal](https://www.paypal.me/MangelMaxime) 8 | 9 |

10 | 11 | sponsors 12 | 13 |

14 | 15 | *If you found a typo or error in the backers list please open an issue on [https://github.com/MangelMaxime/sponsors](https://github.com/MangelMaxime/sponsors)* 16 | -------------------------------------------------------------------------------- /paket.dependencies: -------------------------------------------------------------------------------- 1 | version 6.1.3 2 | source https://www.nuget.org/api/v2 3 | 4 | storage: none 5 | 6 | nuget FSharp.Core ~> 5 redirects: force 7 | nuget Fable.Core 8 | nuget Fable.Date 9 | nuget Fable.Elmish 10 | nuget Fable.FontAwesome 11 | nuget Fable.FontAwesome.Free 12 | nuget Fable.Node 13 | nuget Fable.Promise 14 | nuget Feliz 15 | nuget Feliz.Bulma 16 | nuget Glutinum.Chalk 17 | nuget Glutinum.Express 18 | nuget Thoth.Json 19 | nuget Microsoft.SourceLink.GitHub copy_local: true 20 | 21 | group ApiGen 22 | source https://api.nuget.org/v3/index.json 23 | framework: net6.0 24 | 25 | nuget FSharp.Formatting 26 | nuget FSharp.Core 27 | nuget FSharp.Compiler.Service 40.0.0 28 | nuget Expecto 29 | nuget Argu 30 | nuget FSlugify 31 | -------------------------------------------------------------------------------- /docs/nacara/guides/deploy-your-site.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Deploy your site 3 | layout: standard 4 | --- 5 | 6 | Nacara is a static site generator, meaning that your website is only static HTML, JavaScript and CSS files. 7 | 8 | ## Build your site 9 | 10 | You can build your side for **production** by running: 11 | 12 | ``` 13 | npx nacara build 14 | ``` 15 | 16 | The static files generated are located in the `build` folder. 17 | 18 | ## Deploy your site 19 | 20 | You can test your production website locally by running: 21 | 22 | ``` 23 | npx nacara serve 24 | ``` 25 | 26 | You can now deploy the `docs` folder almost anywhere. 27 | 28 | For example, on Github you can choose to push the `docs` and serve your website using [Github pages](https://pages.github.com/). 29 | -------------------------------------------------------------------------------- /docs/nacara-layout-standard/partials.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Partials 3 | layout: standard 4 | --- 5 | 6 | The following partials are supported: 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 25 | 26 | 27 |
PropertyRequiredDescription
19 | footer 20 | 23 | A footer to include at the bottom of all pages. 24 |
28 | -------------------------------------------------------------------------------- /docs/_partials/footer.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const CopyrightScript = () => ( 4 |