Commit graph

16 commits

Author SHA1 Message Date
Eric
2ca4f2f376
Website: Allow double curly brace templates in Markdown code blocks. (#25179)
Closes: https://github.com/fleetdm/fleet/issues/25176

Changes:
- Updated the to-html helper to add the `v-pre` directive to Markdown
code blocks, This directive will prevent any of the content inside of it
from being interpreted as a Vue template.
- Updated the regex in build-static-content that looks for vue templates
to not match any templates inside code blocks.
2025-01-06 14:07:31 -06:00
Eric
da0268eec8
Website: Update Markdown headings (#19608)
Closes: #19606

Changes:
- Updated the `to-html` helper to add optional linebreaks to all
Markdown headings that contain an underscore.
2024-06-07 17:48:44 -05:00
Eric
9891861e58
Website: Improve support for indented content in Markdown lists, update MDM macOS setup docs page. (#14124)
Closes: #12836 

Changes:
- Updated the `build-static-content` script to not add HTML comments to
Markdown codeblocks, and to not replace HTML comments in generated HTML
pages
- Updated the custom codeblock renderer in the `to-html` helper to add
syntax highlighting classes to Markdown codeblocks.
- Updated the indentation of content in lists on the MDM macOS setup
docs page.

---------

Co-authored-by: Rachael Shaw <[email protected]>
Co-authored-by: Mike McNeil <[email protected]>
2023-09-29 13:13:03 -07:00
Eric
989a265e75
Website: Change bootstrap class added to tables on pages built from Markdown (#12024)
Closes: #11989
Changes:
- Changed the Bootstrap 4 class that is added to every table in content
built from Markdown so our tables are responsive at all widths
(`table-responsive-xl` » `table-responsive`)
2023-05-29 20:25:24 -05:00
Eric
f970f6fb8d
Website: Remove extra dashes from markdown links (#10657)
Closes: #10458

Changes:
- Updated the generated id's for headings in Markdown content to remove
extra dashes in words that have multiple letter casings (e.g., `#my-sql`
» `#mysql`, `#git-hub-security` » `#github-security`)
- Updated links to Markdown headings that have changed.
.  ..

---------

Co-authored-by: Mike McNeil <[email protected]>
2023-03-22 19:34:59 -05:00
Eric
0811946a84
Website: update Markdown blockquotes (#7046)
* Add blockquote styles, to-html.js updates

* test article *REVERT THIS COMMIT BEFORE MERGE*

* Revert "test article *REVERT THIS COMMIT BEFORE MERGE*"

This reverts commit 3192bdbf75.

* to-html comments & update variable names

* Update to-html.js

* add new blockquote styles to docs and handbook pages

* update purpose name & stylesheets

* wrap blockquoteHtml in divs, add examples to markdown guide

* lint fix

* update quote and large quote blocksquotes usage, revert *most* to-html changes

* lint fixes
2022-08-05 16:15:46 +09:00
Eric
ded5a3592e
Website update markdown checkboxes (#7019)
* add custom list item renderer

* add styles for checkboxes to markdown content

* bring checkboxes back into article

* lint fix

* update comment

* update variable names, disable all checkboxes

* update comment and disabled usage.
2022-08-03 12:04:49 -05:00
Eric
14e1b36362
Website: Update tables in HTML compiled from Markdown (#6929)
* add custom table renderer to to-html

* remove table-layout from docs stylesheet

* Update to-html.js

* update comment

* lint fix

* rename variables
2022-08-03 10:38:05 -05:00
Eric
f3212f4537
Website: update marked dependency (#6189) 2022-06-13 13:41:18 +09:00
Eric
71edc210b2
Website: Add blockquote styles to Handbook and Docs pages (#5009)
* add custom blockquote render and styles

* Update to-html.js

* adjust margin, replace icon

* increase margin on image

* Style updates

After seeing it in action, I noticed some improvements. I also updated Figma to reflect.

• Changed colors and icon alignment
• Adjusted top/bottom margins
• Adjusted corner radius
• Added new color variable (existing in Figma) to colors.less

Co-authored-by: Mike Thomas <[email protected]>
2022-04-08 20:36:55 -05:00
eashaw
93b50c3787
Add support for mermaid diagrams to fleetdm.com/docs (#4288)
* Add mermaid.js, remove mermaid codeblocks from <pre> tags, styles

* add custom codeblock renderer, remove jquery unwrapping, hide mermaid blocks until fully rendered

* update comment

* layout update

* Add section to the handbook about mermaid code blocks, add mermaid styles to handbook

* Update handbook/community.md

* Update handbook/community.md

Co-authored-by: Mike Thomas <[email protected]>
2022-02-22 21:49:34 +09:00
eashaw
a640f5ace9
Add optional line breaks to heading text (#2876) 2021-11-10 12:50:32 -06:00
eashaw
4d0b19d8fb
Fix broken links and duplicate IDs on fleetdm.com/docs (#2426)
* update heading renderer, fix links to blog.fleetdm.com

* inverted conditional, using ensureUniq
2021-10-07 12:20:41 -05:00
eashaw
accfa22189
updated styles, class names, and renderer (#2169) 2021-09-21 16:17:45 -05:00
eashaw
57ba22d2b0
Add clickable anchor links in fleetdm.com/docs (#2010)
* added a default renderer for headings to keep the links consistent with the ids

* adjusted the render function to create a link for each heading

* added styles for the heading links and link icon

* changing variable names to be more specific, fixing sidebar links, hiding autogenerated <ul>s

* Removed lodash require, updated comment, removed px from icon filename, and updated link to image.
2021-09-16 17:04:26 +09:00
Mike McNeil
8097251565
Put live documentation on fleetdm.com (#1380)
* minor clarifications

* further expand comments and stubs

* absorb custom titles embedded in metadata, plus further comment expansion and a followup fix for something i left hanging in f8cbc14829

* Skip non-markdown files and use real path maths

* Prep for running in parallel (Remove `continue` so this isn't dependent on the `for` loop)

* determine + track unique HTML output paths

* Compile markdown + spit out real HTML  (without involving any but the crunchy nougaty dependency from the very center of everything)

* add md metadata parsing

* add timestamp

* Update build-static-content.js

* attach misc metadata as "other"

* how doc images might should work (this also aligns with how the select few images in the sailsjs.com docs work)

* add file extension to generated HTML files

* "options"=>"meta"

* Make "htmlId" useful for alphabetically sorting pages within their bottom-level section

See recent comments on https://github.com/fleetdm/fleet/issues/706 for more information.

* list out the most important, specific build-time transformations

* Omit ordering prefixes like "1-" from expected content page URLs

* add a little zone for consolidating backwards compatible permalinks

* interpret README.md files by mapping their URLs to match their containing folder

* clarify plan for images

* decrease probability of collisions

* Make capitalization smarter using known acronyms, proper nouns, and a smarter numeric word trim

* Resolve app path in case pwd is different in prod

* Delete HTML output from previous runs, if any

* condense the stuff about github emojis

* got rid of "permalink" thing, since id gets automatically attached during markdown compilation anyway

Also "permalink" isn't even a good name for what this is.  See https://github.com/fleetdm/fleet/issues/706#issuecomment-884693931

* …and that eliminates the need for the cheerio dep!

* Bring in bubbles+syntax highlighting into build script, and remove sails.helpers.compileMarkdownContent()  -- this leaves link munging as a todo though

* trivial (condense comments)

* Remove unused code from toHtml() helper

* Implemented target="_blank" and root-relative-ification

* remove todo about emojis after testing and verifying it works just fine

* trivial: add link to comment in case github emojis matter at some point

* consolidate "what ifs" in comments

* Leave this up to Sarah, for now. (Either bring it back here in the build script or do it all on the frontend)

* Enable /docs and /handbook routes, and add example of a redirect for a legacy/deprecated URL

* implement routing

* Upgrade deps

this takes advantages of the latest work from @eashaw, @rachaelshaw, and the rest of the Sails community

* tweak var names and comments

* make readme pages use their folder names to determine their default (fallback) titles

as discussed in https://github.com/fleetdm/fleet/issues/706#issuecomment-884788002

* first (good enough for now) pass at link rewriting

as discussed in https://github.com/fleetdm/fleet/issues/706#issuecomment-884742072

* Adapt docs pages to build from markdown output

* Continue work on docs pages

* Add landing page

* Remove unused code; minor changes

* Replace regex

* fixes https://github.com/fleetdm/fleet/pull/1380#issuecomment-891429581

* Don't rely on "path" being a global var

* Syle fleetdm doc pages

* Continue work on docs pages

* Fix linting error

* Disable lesshint style warnings

* parasails-has-no-page-script attribute

Added a parasails-has-no-page-script attribute to the docs template, added a check for that attribute in parasails.js and removed the empty page script for 498

* bring in latest parasails dep

* trivial

* Update links to dedupe and not open in new tab unless actually external

* Disable handbook for now til styles are ready

* fix CTA links

* trivial

* make sitemap.xml get served in prod

* hide search boxes for now, remove hard-coded version and make releases open in new tab

* clean out unused files

Co-authored-by: gillespi314 <[email protected]>
Co-authored-by: eashaw <[email protected]>
2021-08-17 19:55:13 -05:00