Commit Graph

51 Commits

Author SHA1 Message Date
Eric
a450bf2c58
Website: update get-extended-osquery-schema helper (#17190)
Closes: https://github.com/fleetdm/fleet/issues/17188

Changes:
- Updated `get-extended-osquery-schema.js` to only include the last
example from the osquery schema if a table has an override file that
does not contain an `examples` value.
- Regenerated osquery_fleet_schema.json with the correct `examples`
values
2024-03-01 12:48:06 -06:00
Luke Heath
3f1ade51a0
Add myself to product groups handbook maintainers (#17239) 2024-02-29 11:02:17 -06:00
Rachael Shaw
ae669e1749
2023-10-17 Update osquery schema version & regenerate merged schema (#14436)
When running a live query recently, I noticed some columns in the
results that we didn't have documented, and realized we weren't using
the latest osquery schema version when regenerating the merged schema.

According to the docs, [we support the latest version of
osquery](https://fleetdm.com/docs/using-fleet/enroll-hosts#supported-osquery-versions),
so figure we ought to update the schema version to the latest.

---------

Co-authored-by: Eric <eashaw@sailsjs.com>
2023-10-26 18:04:23 -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 <r@rachael.wtf>
Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
2023-09-29 13:13:03 -07:00
Eric
45e1b56bb1
Website: sort merged osquery schema (#13959)
Closes: #13722

Changes:
- Updated the `get-extended-osquery-schema` helper to sort the merged
schema by table name.
- Regenerated `/schema/osquery_fleet_schema.JSON`
2023-09-15 18:40:57 -05:00
Eric
85fdeb4234
2023-09-16: Website: Update sitemap, set lastModifedAt timestamps for osquery schema pages. (#13725)
Closes: #13728

Changes:
- Added /support to the array of hand-coded HTML pages in
`download-sitemap.js`:
- Updated `get-extended-osquery-schema`:
- Added a new (optional) input: `includeLastModifiedAtValue` if this
input is provided, the helper will:
      - Set a `lastModifiedAt` value on all tables.
- Send a request to the GitHub API to get a lastModifiedAt timestamp for
tables that have no fleet overrides.
- Use `git` to get a lastModifiedAt timestamp of when the tables YAML
file was changed.
- Updated the `build-static-content` script to include a lastModifiedAt
timestamp for table pages, and updated the `lastModifiedAt` value that
is set for pages built from `/handbook/company/open-positions.yml`

---------

Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
2023-09-15 18:39:39 -05:00
Eric
46802ee56a
Website: Add admin page to manage the Fleet Sandbox waitlist (#13111)
Closes: #12954

Changes:
- Added an admin page that displays a table containing all of the users
that are currently on the Fleet Sandbox waitlist where admins can
approve waitlisted users.
- Added a new email template that tells users that their Fleet Sandbox
instance is ready.
- Added a new action:
`admin/provision-sandbox-instance-and-deliver-email.js`, an action that
provisions a Fleet sandbox instance for a single user and sends them an
email telling them that their Fleet Sandbox Instance is ready.
- Added a script that provisions a Fleet Sandbox instance for the user
who has been on the waitlist the longest and sends them an email telling
them that their Sandbox instance is ready.
2023-08-04 18:32:00 -05:00
Eric
ab504d766a
Website: Update admin license generator (#13101)
Closes: https://github.com/fleetdm/confidential/issues/3230

Changes:
- Added a new (optional) input to the admin license key generator:
`partnerName`.
- Renamed `admin/generate-license-key.js` to
`admin/build-license-key.js`, updated routes and regenerated
`cloud.setup.js`
- Updated the create license key helper to add a `partner` field to the
generated license key if `partnerName` is provided.
2023-08-04 14:48:29 -05:00
Sampfluger88
0d93b9687b
Request review automatically for non-codeowners (#12786)
https://github.com/fleetdm/confidential/issues/3146

To test this works:
- sam should be able to change ceo handbook and be autoapproved
- mike submitting a PR to the ceo handbook should request review from
Sam but auto-approve for mike
- Jarod's use case of creating an article should now work, even if his
PR contains images

.

---------

Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
2023-07-15 19:56:30 -05:00
Eric
3b6b6e6f3f
Website: update fleetRepoUrl for tables that don't have Fleet overrides (#12458)
Closes: #12434
Changes:
- Updated the `fleetRepoUrl` value for tables that don't have Fleet
overrides. The additional `/tables` in the file path is causing the
template link to create a new file in a `schema/tables//tables/` folder.
2023-06-22 15:58:01 -05:00
Eric
01106d05a6
Update platform value for ChromeOS tables, Update Fleet website to use new value, and regenerate schema JSON (#12091)
Changes:
- Updated the `platform` value for osquery tables and columns that
support chromeos to be `chrome` (Previously `chromeos`)
- Updated `get-exteneded-osquery-schema.js` to use the new `platform`
value
- Updated the Fleet website to use the `chrome` `platform`.
- Regenerated `schema/osquery_fleet_schema.json` with ChromeOS tables.
2023-06-02 17:44:06 -05:00
Eric
d18db8f9ee
Website: Add support for ChromeOS to query library and osquery schema pages. (#12013)
Closes https://github.com/fleetdm/fleet/issues/11837

Changes:
- Changed the OS icons used on tables/ and queries/ pages.
- updated `get-extended-osquery-schema` to change the `platform` value
of osquery table columns to be the normalized platform name (`chromeos`
» `ChromeOS`)
- updated `build-static-content` to support three `platforms` values
when adding platform compatibility notes to generated Markdown tables
(e.g., "**Only available on macOS, Linux, and Windows.**" )
- Added dropdown options and icons for ChromeOS on osquery schema table
pages, query details pages, and the query library.
2023-05-31 11:48:00 -05:00
Luke Heath
78d4b04f04
Add fleet-release approval for new gitops action repo (#11818) 2023-05-30 11:27:39 -05: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 <mikermcneil@users.noreply.github.com>
2023-03-22 19:34:59 -05:00
Eric
767fc39387
Update osquery schema version & regenerate merged schema (#10471)
Changes:
- Changed the version of osquery schema we merge with Fleet's overrides
from `5.7.0` to `5.8.1`
- Rand the `generate-merged-schema` script to regenerate
`osquery_fleet_schema.json` .


## EDIT
Mike: Hi Eric, if my changes look good to you, and if it's passing CI,
would you merge?

.

---------

Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
2023-03-17 19:32:34 -05:00
Mike McNeil
73b8f96f71
Make it so chrome_extensions shows up in a search for "browser plugins", same for firefox/ie/safari (#9540)
.
2023-01-27 17:44:05 -06:00
Eric
07f8ec14e6
Update YAML schema table validation (#9302)
Changes:
- Added three errors to
`website/api/helpers/get-extended-osquery-schema.js` that are thrown if
a YAML schema table has:
   - A `platforms` value that is not an array
   - A `description` value that is not a string
   - A `columns` value that is not an array
- Updated the `platforms` of YAML schema tables in `schema/tables/` that
had string `platforms` values
- Regenerated `/schema/osquery_fleet_schema.json`
 
.
2023-01-13 10:16:36 -06:00
Eric
c28056e36c
Update osquery schema version and regenerate merged schema JSON (#9292)
Changes:
- Updated the version of the osquery schema we merge with Fleet's
overrides (`5.6.0` » `5.7.0`)
- Ran the `generate-merged-schema` script to regenerate
`schema/osquery_fleet_schema.json`
 . .
2023-01-12 10:06:15 -06:00
Eric
112dffbd1e
Website: Update license key generator action and helper inputs (#9265)
Changes:
- Updated the `expiresAt` input description in
`api/controllers/admin/generate-license-key.js` and
`api/helpers/create-license-key.js`
- Updated timestamps sent to `generate-license-key` and
`create-license-key` to be in seconds.

 . .

Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
2023-01-11 11:11:43 -06:00
Roberto Dip
5919931a4c
fix conflicts in docs about unified_logs vs macadmins_unified_logs (#9214)
As raised by a community member in
[Slack](https://osquery.slack.com/archives/C01DXJL16D8/p1672751794862639),
this updates our documentation to account for both `unified_log` and
`macadmins_unified_log`.

Per my testing, it should also help with the #9158 bug in Fleet's UI.

I have updated the columns of `macadmins_unified_log` according to
what's in the [source
code](50f94d0d70/tables/unifiedlog/unified_log.go (L47-L69)),
and modified the example to work.

Since I was there I have also updated the osquery version we use to pull
the JSON to `5.6.0` and fixed a small bug related to the examples we
pull from there.

. . . . . . .

Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
2023-01-10 17:45:53 -06:00
Eric
896918bc79
Website: Fleet Premium subscription renewals (#9200)
https://github.com/fleetdm/fleet/issues/9172

Changes:
- Added
`website/api/controllers/webhooks/recieve-stripe-subscription-events.js`
a webhook for receiving Stripe events.
- If the stripe event received is from a user's subscription
automatically renewing, A new license key is generated, the subscription
record is updated, and a renewal confirmation email is sent.
- If the stripe event received is from a user's subscription's upcoming
renewal, a renewal notification email is sent.
- If any other event type is received from Stripe, the webhook returns a
200 response.
- Added new email templates:
   - `email-subscription-renewal-confirmation`
   - `email-upcoming-subscription-renewal`
- Updated `website/api/controllers/admin/view-email-template-preview.js`
to have fake data for the added email templates.
- Updated `website/api/controllers/customers/view-dashboard.js` to set
two boolean variables: `subscriptionExpiresSoon` and
`subscriptionHasBeenRecentlyRenewed`
- Updated the customer dashboard to display notifications on the top of
the page if a user's subscription will renew in the next 30 days, or if
the user's subscription has been renewed in the past 30 days.
- `website/views/layouts/layout-email.ejs` - Updated the font, padding,
and text color to match wireframes.
2023-01-06 18:36:29 -06:00
Eric
379f61a39f
Update Github URL for tables that have Fleet overrides (#9213)
Changes:
- Updated the fleetRepoUrl value for osquery schema tables that have
Fleet overrides to use the correct URL.
2023-01-06 17:14:04 -06:00
Eric
2d0f33f369
Website: Add script for creating HTML email partials from Markdown articles (#7574)
* add to-html-email

* email-preview

* add build-html-email script, update .gitignore

* email preview and email-templates pages, update routes, importer and policies

* add newsletter email layout, build-html-email script, to-html-email updates

* Update .gitignore

* add newsletter emails section to growth handbook

* update scripts

* update fonts in emails

* Update README.md

* Update build-html-email.js

* update comments, add page scripts to layouts

* revert change to build-static-content

* update script

* update email layout and helper

* update handbook entry

* update template data and helper

* update email layout

* update fake data and unsubscribe link

* move added handbook section to the marketing handbook

* rename script

* update colors in unused email template

* update capitalization in helper

* view-email-preview » view-email-template-preview

* Hide emails generated from markdown if they don't exist

* update preview page

* update markdown email directory, create sample article email

* lint fixes, add target="_blank" to links in emails

* update page layouts & styles

* update sample newsletter email, code font, newsletter layout

* Update README.md

* Update view-email-template-preview.js

Co-authored-by: Tim Kern <tim@fleetdm.com>
Co-authored-by: Mike Thomas <78363703+mike-j-thomas@users.noreply.github.com>
Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
2022-12-05 16:30:24 -06:00
Eric
48f86b21b1
Website: Add admin tool for generating Fleet Premium licenses. (#8478)
* create admin/generate-license page

* create generate-license-key action, update routes, policies, importer, regenerate cloud-sdk

* update layouts

* use moment

* Update view-generate-license.js

* Fixing lint errors

* Update generate-license-key.js

* Update redirects in is-super-admin policy

* redirect super admins to the license generator

* Update login form

* requested changes from mike-j-thomas

* Update generate-license.page.js

* Update is-super-admin.js

* Update view-login.js

* Update generate-license-key.js

* Update generate-license-key.js

* use naming convention for js timestamps

* validTo » expiresAt

Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
2022-12-05 14:53:16 -06:00
Eric
a59e1cce80
Website: Add support for confidential repo to Github webhook (#8654)
* add confidentialGithubRepoDRIByPath to custom config

* Add support for the confidential repo to receive-from-github & get-is-pr-preapproved

* Update confidential repo DRIs

* remove no longer relevant folder

* Fix lint

* repository » repo

Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
2022-12-05 13:58:21 -06:00
Eric
0853d338f8
Website: Update table pages (#8410)
* add link to "defaults to root" text and evented table labels

* override requires_user_context value in merged schema

* update link styles on table pages

* Update get-extended-osquery-schema.js

* encodeURIComponent

Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
2022-11-10 17:12:24 -06:00
Eric
7406797d5c
move acpi_tables.yml & update get-extended-osquery-schema (#8364)
* move acpi_tables.yml & comment out unused fields, update get-extended-osquery-schema

* add '/tables/' to filename in fleetRepoUrl
2022-10-25 15:19:11 -05:00
Eric
9dc5d4f53e
fix fleetRepoUrl (#8325)
Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
2022-10-19 10:21:05 -05:00
Eric
e82962e4a7
Add Fleet override schema files (#8278)
* create schema/tables, add yaml schema tables

* Update osquery-table-details.ejs

* Generate schema from schema/tables/ folder

* Create generate-yaml-tables-from-json.js

* update created table files

* update fleet override validation

* update error messages, add fleetRepoUrl

* Delete generate-yaml-tables-from-json.js

* Update osquery-table-details.ejs

* Update whitespace in table examples

* Revert "Update osquery-table-details.ejs"

This reverts commit 2e9d63208f59997d492375ebaf1d0ec7e4afe468.

* add YAML tables generated from updated Fleet schema

* lint fixes

* update arp_cache and docker_containers tables
2022-10-18 14:13:42 -05:00
Eric
8fecef3ed5
Update merged schema helper and script. (#8092)
* update helper to use the osquery schema from the osquery/osquery-site repo

* update script description and generated json filename

* Add ritual to digital experience handbook

* add merged schema

* Update README.md

* Update get-extended-osquery-schema.js
2022-10-05 15:10:08 -05:00
Eric
ddb074996c
Website: Move schema table merging into helper, update build script (#7980)
* move table schema merging into helper

* update helper name, add evented value to table configuration

* update indentation

* update error messages for readability

* typo

* update helper name, exits and description

* Add missing columns to osquery_tables.json

* add merge schema script

* rename script to `generate-merged-schema`

* Update generate-merged-schema.js

* Add error messages

* update error messages

Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
2022-09-29 16:38:10 -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 3192bdbf753894c354146048df24ebeb30cdc3bc.

* 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
20afcb8f29
Add #handbook label to handbook only PRs (#6967)
* add #handbook label to handbook PRs

* Update get-is-pr-only-handbook-changes.js

* remove while loop from _.all()

* revert changes to github token name

* Simplifications

Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
2022-08-01 22:27:54 -05:00
Eric
f3212f4537
Website: update marked dependency (#6189) 2022-06-13 13:41:18 +09:00
Mike McNeil
5fe7fea24d
Tool: sails run freeze-open-pull-requests (#5610)
* trivial (comments)

* Remove old unfreeze/freeze logic

* trivial (clarify comment)

* Trivial (fix weird character)

* Extrapolate DRI mappings into config.

* Explain why this exists

* Extrapolate logic

* Use extrapolated logic + add 5 second wait time to prevent accidents + clean up

* Use extrapolated logic and fix omission in helper

* Make freezing actually happen and document usage

* In script, don't freeze PRs as long as they're preapproved to be edited by SOMEBODY

* Lint fixes
2022-05-06 00:12:50 -05: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 <mthomas@fleetdm.com>
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 <78363703+mike-j-thomas@users.noreply.github.com>
2022-02-22 21:49:34 +09:00
eashaw
7895636335
license key generate input type update (#3877) 2022-01-25 14:19:23 -06:00
eashaw
e335e835c9
Add customer portal and license dispenser to fleetdm.com (#3546)
* Add images for customer portal, dashboard, and email templates

* updated email layout and reset password template, new email template

* update ajax-button component to have an optional spinner

* updated cloud-error & stripe-card-element component styles

* updates to user model, add quote and subscription

* Login, signup, forgot password, update profile

* link to customer portal from pricing

* new-license page, bootstrap updates

* create quote action, dashboard page, update routes

* Add new page styles to importer, update component styles

* updates to js-timestamp

* update modal styles and layout

* using @submitted on ajax form, controller updates

* Update create-quote.js

* updates to quote model, action updates, truncate license key on dashboard

* update email layout, subscribe action, user model

* Update importer.less

* style updates, order confirmation

* use correct font

* style updates

* create license key

* new-license page changes

* signup page changes

* add billing format to js-timestamp component, dashboard updates, change password

* swap get started link for customers

* order -> subscription

* Update login.ejs

* Lint fixes, page updates, mobile styles

* remove edit-profile route, update layout, bootstrap, forms

* change customer-layout name to match other layout names, update copyright year in layouts

* changes requested from code review and #3570

* submit button width, contact font-size

* Update dashboard.less

* Update bootstrap-overrides.less

* slack logo update, login text
2022-01-04 20:02:42 -06: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 f8cbc14829d91e7577c63307fd9c4346dbc229bb

* 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 <73313222+gillespi314@users.noreply.github.com>
Co-authored-by: eashaw <caglc@live.com>
2021-08-17 19:55:13 -05:00
Mike McNeil
ac220ba6e5
Obviate doc-templater dependency + dynamic sitemap.xml (#827)
* trivial

* Simplify build-static-content script and rip out the old markdown compilation for query library

* improve error msg

* trivial

* move helper

* bring in the skeleton

* Compile handbook as well, and bring more stuff inline

* instead of generating sitemap.xml file, could just serve it as a route

* Serve sitemap.xml on the fly

* add failsafe to prevent search engine accidents

* add remaining hand-coded pages to sitemap

* rearrange routes and get rid of commented-out ones

* Update build-static-content.js

* stub out the remaining pieces

* Add assertion (Which actually helped catch a real duplicate query: get-mac-os-disk-free-space-percentage)

* clean out inadvertently committed stuff in sailsrc

* route and serve data for correct query by slug + fix error message re duplicate query slugs + added assertion for duplicate doc page slugs

* yaml == dev dependency

* remove doc-templater dependency, as promised

* stub out handbook page

* clarify comments & remove unnecessary skipAssets

* Update build-static-content.js

* res.badConfig()

* add missing exit that I left out back in ec95df6a4b

* remove unused file

* update comments before commenting out and moving over to basic-documentation.less

* move example styling of generated HTML over to docs/handbook

* include both links

* Fix sitemap.xml URLs in local dev by fixing baseUrl config for local development (since Fleet itself is on 1337).

* followup to d55c777590

* Include query pages in sitemap.xml (+make urls generated for docs/handbook in build script slightly more real) -- but also don't serve sitemap

* sails.config.builtStaticContent.allPages » sails.config.buildStaticContent.markdownPages  (also remove unnecessary trailing slash trimming)

* trivial

* check config when serving sitemap + smarter error message for contributors

* hook up GitHub link to edit the query

* remove html ids

* Update query-detail.ejs

* somre more setup re https://github.com/fleetdm/fleet/issues/368#issuecomment-848566533
2021-05-26 03:24:38 -05:00
Mike McNeil
d50b48e7c2
Absorb yaml queries into website, + stub /queries + /documentation (#812)
* Upgrade to get rid of REPL schmutz

* rename workflow to lessen ambiguity vs. markdown compilation of docs

* ensure lockfile makes it to fleetdm.com prod

* skip force git add of package-lock to avoid confusion for now. (reverts 4e7e23990c472e84f3f24391ef360a175f725609)

* rename build script (because now it won't always be markdown source files)

* update metadata to match prev commit

* change key name in generated sailsrc for consistency

* stub query library page

* used named params so others can tell what's up with the forcing

* expand comments

* expand comments

* intermediate commit- playing with inlining the guts from doctemplater

* stub basic docpage shell and a little page to preview that on

* Compile YAML and set up query library page

* clean sailsrc

* optimize build by running everything in parallel

* Add note about the fact that we don't even need to clone anything since we've consolidated it all into one repo now.  facepalm

* un-parallelize one bit that fails in CI if it's parallelized (it'll go away soon anyway)
2021-05-20 03:22:42 -05:00
Mike McNeil
56e143a14f
Compile markdown docs (#714)
* Brought in the mostly-unchanged stuff from Sails website- changed just enough to get it working

* inline beforeConvert and afterConvert, for readability

because it's better when you tell a story with the parts of the story in order

* trivial (change arg name for clarity)

* trivial (apply more up-to-date err callback convention)

* modernize some of the bits relying on reassigning arguments

* convert the rest of the way to async/await

* trivial

* just aesthetics

* remove reliance on app-level config

* mostly i'm doing this to remember how it works

* normalize better so this can be more flexible

* this makes it work (albeit needs a bit more fluffing)

* strip out more sails-specific stuff

* clean up menu files between runs, scrape off a bit more technical debt

* scrape out some more dead code

* use devDependencies for markdown compilation stuff since it won't be compiling at runtime

* stub script for compiling markdown content

* Fill in implementation of script, rename helper.

* add note about the non-markdown file problem

* tweak output paths for clarity

* Improve generated menu content and set up groundwork for being able to easily access it via config

* Use .sailsrc to hold onto menu content, so it's injected into config for easier access (rather than reading JSON files whenever needed)

* more explicit tmp filename, in case we forget how this works later

* fix typo in build script (missing .js extension)

* Stub query detail page and a dev route for developing it

http://localhost:2024/sandbox/example-query

* fix helper friendlyName

* Run compilation in series to avoid race condition in doc-templater when cloning from the same repo.  Add todos about sitemap and further menu data cleanup.

* make sandbox actually useful

* Help prevent accidental checking in of compiled HTML files.

* rename script and generated folder in partials/

* fix/expand script metadata
2021-05-09 23:48:59 -05:00