Commit graph

15 commits

Author SHA1 Message Date
Eric
e5303dd339
Website: uncomment warning related to missing Cloudflare headers (#36295)
Changes:
- Uncommented a warning that is logged if certain Cloudflare headers are
missing. (Reverted the changes from
https://github.com/fleetdm/fleet/pull/35909)
2025-11-25 13:10:18 -06:00
Eric
7ea2183688
Website: disable warning related to missing Cloudflare headers (#35909)
Changes:
- Commented out a warning that is logged if Cloudflare headers are
missing
2025-11-18 10:36:22 -06:00
Eric
89d15bb71f
Website: follow up changes from pr review (#23471)
Changes:
- Updated view-basic-documentation, view-transparency, and
view-device-management to log warnings if the Cloudflare headers we use
to determine whether or not to show the swag CTA are missing in
production
- Fixed a typo in save-questionnaire-progress
2024-11-01 16:11:00 -05:00
Eric
fbf1f55399
Website: Remove duplicate "Fleet" from page titles (#20893)
Changes:
- Removed the duplicate "Fleet" from page titles.
2024-07-31 14:50:42 -05:00
RachelElysia
5ae52b3a0b
Fleet UI: Update page titles (#15983) 2024-01-12 09:27:56 -05:00
Eric
2f00e528dc
Website: Move docsearch public api key to config variable (#7771)
* move docsearch api key to a config variable, update styles to disable outline on input

* Update basic-handbook.less

* Update basic-handbook.less

* update config variable name & update comment
2022-09-21 18:13:47 -05:00
Eric
f4c2b62fd5
Website: Conditionally show swag CTA (#6964)
* conditionally hide fleet swag form

* Check cp-ipcountry and cp-iplongitude

* update comment

* use req.get(), update comment
2022-08-01 15:58:05 -05:00
Mike McNeil
a26e5002a3
Website: Follow up to strip leading slashes (#6843)
* Website: Follow up to strip leading slashes

re https://github.com/fleetdm/fleet/pull/6796#issuecomment-1193054810

* remove log

* Verified: whitespace trim not needed

And leading slash trim is only needed if using a regex route (not something I recommend most of the time).  But since we are using one, I included it, and put it in all three places for consistency.  (It doesn't ever hurt)
2022-07-25 11:16:40 -05:00
Mike McNeil
525a144311
Website: Simplify regex syntax used for #2025 (#6796)
* Simplify regex syntax used for #2025

* extra trailing slashes now redirect instead of rendering

* Simplify regex

* Match implementation to view-basic-documentation, etc

* Match view-basic-documentation, and slurp up title and description logic to help indicate (and future proof) that it has no side effects

* Update view-basic-handbook.js

* Update view-basic-documentation.js

* trivial

* lint fix

* make handbook and doc landing pages continue working despite my recent commit in this same PR, and add some comment clarifications

* update regex to replace leading slashes and whitespace

Co-authored-by: Eric <[email protected]>
2022-07-21 17:02:32 -05:00
eashaw
5de5b13223
Dynamic titles for documentation, query, and handbook pages (#2298)
* handling redirect

* clean up redirect/notFound flow

* dynamic query titles and description

* dynamic docs titles

* Remove locals from queries and docs, updated comment and variable names

* handling FAQ page titles

* update comment, title in meta, and adjust get started title

* remove unneeded meta tag

* handbook titles

* cleaning up conditionals

* update comments

* removed added meta tags, change meta variable names

* passing in meta description if provided, update conditionals and comments

* Update FAQ.md
2021-09-30 21:14:02 -05:00
eashaw
5eb14e290f
Fix 500 error being thrown on fleetdm.com (#2144)
* update notFound conditional

* Update view-basic-documentation.js
2021-09-20 13:29:59 -05:00
eashaw
cf793ff3a0
Implement redirect in view-basic-documentation (#2083)
* handling redirect

* clean up redirect/notFound flow
2021-09-17 11:14:05 -05: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
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 4e7e23990c)

* 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