mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
Squashed 'docs/' changes from d1a251933..dc7a9ae12
dc7a9ae12content: Update JS options07d3d8803npm: Use tilde ranges for versionse06362a13Minor grammar fixesc42db0838content: Algolia DocSearch clarificationd67412b82deps: Upgrade to TailwindCSS 4.1.0da1fb12d3theme: Update Lato font path for images.Text example140fa3bb9Update introduction.md7b1fcca27content: Fix links to embedded template source908a55532theme: Improve dark mode syntax highlighting backgroundd830e5962Update XxHash.md807be5dbfUpdate Defer.md4b56693f6content: Update GitHub Pages sample workflow57b766fbaUpdate TailwindCSS.md64982ab6aUpdate TailwindCSS.md1b6e879c6Update TailwindCSS.mde67cbcdd2content: Add caching to the GitHub Pages workflow exampleb7ca3b07cUpdate index.md14e1a3977Update XxHash.md980f344aeUpdate XxHash.md6b815f03etheme: Remove aria-label attribute from links1c00bbc45theme: Update npm dependencies533149bf9theme: Include section pages in related content2b6bda6bdcontent: Fix typos92ce95cbbcontent: Miscellaneous editsf12936681theme: Add a simple LRU cache for search339ca3388Fix the previous broken commit8537e59e0Make it into a non-linke13f17d29Add Algolia logo/link to the search listing dialogd3e09e886content: Fix typo7217f64b6content: Miscellaneous edits51aa1ae73content: Improve some examples8ebaa53f9theme: Adjust shortcodes898870438theme: Hide anchor until mouse-overc933ea237content: More front matter cleanupf26ca047acontent: Miscellaneous editse272b2039theme: Fix inline partial refsc540e6d29content: Replace note shortcode calls with blockquote alertsaef899bc5theme: Add title and QR code when printingbd46ef626theme: Implement blockquote render hookddefbefaacontent: Improve contributing pagef41d28ee1content: Adjust usage of whitespace removal with action delimiters03315336dtheme: Use full title in related content sidebar4f4076364misc: Document the front matter fields used on this site2f78d7632misc: Fix gitignore file7de6dbab3content: Fix front matter for several function pages5d3542ea6config: Disable tags taxonomy68bc28d67content: Add linkTitle to shortcode pages5f32c92edtheme: Restore deduplication logic for related itemsa943a4bb8theme: Implement related content toolingfd628be6econtent: Replace calls to the code shortcode with fenced code blocksb23c9a583content: Fix position of new-in badgesec056f251content: Fix typo245351c84theme: Adjust spacing in highlighting theme examples2fcd21ee5content: Remove "related" array from function and method pages71d8426eetheme: Create code block render hook4cdde6649theme: Adjust number of news items to display34ab45261content: Miscellaneous editsb6cae5cbccontent: Consolidate configuration documentation727ef6f66theme: Fix overflow issue for wide tablesc4f759e01Add es202493cce62c8Update support list of more recent targets with js.Build / esbuild974d0655fUpdate hosting-on-codeberg.mdb3f0ed9cecontent: Add hosting instructions for Codeberg Pages8217c0900content: Correct the SourceHut repository URLa8cf3d28fcontent: Add hosting instructions for SourceHut Pages8c059cbe1theme: Use content adapter for news section03938c600Remove some old new-in5c50a75e8content: Fix typo5cf89f2f6theme: Re-enable banner gtag outbound link tracking3c555d5f8One more copy button94bce999aAdd some copy buttons9e1cc0c2bUpdate PortableText.mddd26ac49fDocument transform.PortableText5f632ab32netlify: Hugo 0.145.059e057bb4Update index.mdd07e07d6cRemove some unused home page front matterd482657b7Add footnote about alias to the build front matter keyf0629b77ccontent: Fix typod91c4cccftheme: Fix news items URLsca931cd1ftheme: Restore RSS feed for news sectione6b870bc9theme: Adjust copy-to-clipboard button071851431Update netlify.tomle68431034theme: Format layoutsaa3cd839atheme: Format assets22ad3eee3theme: Add some more space on the right for copy buttonsf4a19083anetlify: Hugo 0.144.1974cb8795theme: Remove Internet Explorer configs (#2929)4a23a1f41content: Fix typosd49f15d03theme: Get the scrollspy back working720c7ff67config: Evict getresource cache hourly1f62ca97etheme: Hide the Turbo progress barf6449ace3Move the dark class up to the html element074cd1a07content: Miscellaneous editse098a7716content: Miscellaneous edits8e1e104aacontent: Updates for v0.144.018e1aa916theme: Add anchor links via JSac3b5505cClose new-inbfa4db6b8netlify: Hugo 0.144.0fd6e7feeeRegen CLI docsda9d1218aRegen docs helper5de494dedMerge branch 'tempv0.144.0'f683e6469theme: Minor improvements to base templateef8bf89d8resources/page: Revise the new contentbasename permalinks tokens901adb07bresources/page: Add :contentbasename and :contentbasenameorslug permalink tokens0fca8ef25all: Change shortcode usage and design to prevent invalid HTMLc41d76613Update RegularPagesRecursive.mde93574748content: Correct return type for strings.Split3d504abbaRevert "content: Add ids to the Netlify steps"c08c8e15econtent: Add ids to the Netlify steps5a3b470a2theme: "move" the id from content to articleb878613aatheme: Add page kind as a CSS class to body269657e8fcontent: Fix formatting error664f6c92fconfig: Change image cache locationfa6b719b1theme: Reduce ToC to level 2-4bc16341catheme: Render mathematical markup with transform.ToMath14bf9dc70theme: Add aria-label attribute to search fieldsed42af5b3theme: Adjust search field and search activationf042e4970dev: Add prettier-plugin-void-htmlf6ec83533content: Fix inline shortcode example0a74210e2theme: Remove readfile shortcode334ca06actheme: Fix some dark mode accessibility as reported by Axe core02626ff92theme: aria-lbabel => aria-label227b76ab7Add Prettier and config43ab22428content: Bump minimum required Go version to 1.23.003e54683fmodules: Add GOAUTH to module config9f06a3b9cjs/esbuild: Add drop optionddcd99369Merge commit 'a024bc7d76fcc5e49e8210f9b0896db9ef21861a'733731253helpers: Add Chroma styles to docs.yaml git-subtree-dir: docs git-subtree-split:dc7a9ae127
This commit is contained in:
@@ -3,16 +3,11 @@ title: css.Sass
|
||||
description: Transpiles Sass to CSS.
|
||||
categories: []
|
||||
keywords: []
|
||||
action:
|
||||
aliases: [toCSS]
|
||||
related:
|
||||
- functions/resources/Fingerprint
|
||||
- functions/resources/Minify
|
||||
- functions/css/PostCSS
|
||||
- functions/resources/PostProcess
|
||||
returnType: resource.Resource
|
||||
signatures: ['css.Sass [OPTIONS] RESOURCE']
|
||||
toc: true
|
||||
params:
|
||||
functions_and_methods:
|
||||
aliases: [toCSS]
|
||||
returnType: resource.Resource
|
||||
signatures: ['css.Sass [OPTIONS] RESOURCE']
|
||||
---
|
||||
|
||||
{{< new-in 0.128.0 />}}
|
||||
@@ -70,10 +65,10 @@ precision
|
||||
: (`int`) Precision of floating point math. Not applicable to Dart Sass.
|
||||
|
||||
enableSourceMap
|
||||
: (`bool`) If `true`, generates a source map.
|
||||
: (`bool`) Whether to generate a source map. Default is `false`.
|
||||
|
||||
sourceMapIncludeSources
|
||||
: (`bool`) If `true`, embeds sources in the generated source map. Not applicable to LibSass.
|
||||
: (`bool`) Whether to embed sources in the generated source map. Not applicable to LibSass. Default is `false`.
|
||||
|
||||
includePaths
|
||||
: (`slice`) A slice of paths, relative to the project root, that the transpiler will use when resolving `@use` and `@import` statements.
|
||||
@@ -128,7 +123,7 @@ Run `hugo env` to list the active transpilers.
|
||||
|
||||
### Installing in a production environment
|
||||
|
||||
For [CI/CD] deployments (e.g., GitHub Pages, GitLab Pages, Netlify, etc.) you must edit the workflow to install Dart Sass before Hugo builds the site[^2]. Some providers allow you to use one of the package managers above, or you can download and extract one of the prebuilt binaries.
|
||||
For [CI/CD](g) deployments (e.g., GitHub Pages, GitLab Pages, Netlify, etc.) you must edit the workflow to install Dart Sass before Hugo builds the site[^2]. Some providers allow you to use one of the package managers above, or you can download and extract one of the prebuilt binaries.
|
||||
|
||||
[^2]: You do not have to do this if (a) you have not modified the assets cache location, and (b) you have not set `useResourceCacheWhen` to `never` in your [site configuration], and (c) you add and commit your `resources` directory to your repository.
|
||||
|
||||
@@ -149,8 +144,8 @@ To install Dart Sass for your builds on GitLab Pages, the `.gitlab-ci.yml` file
|
||||
|
||||
```yaml
|
||||
variables:
|
||||
HUGO_VERSION: 0.141.0
|
||||
DART_SASS_VERSION: 1.83.4
|
||||
HUGO_VERSION: 0.144.2
|
||||
DART_SASS_VERSION: 1.85.0
|
||||
GIT_DEPTH: 0
|
||||
GIT_STRATEGY: clone
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
@@ -183,8 +178,8 @@ To install Dart Sass for your builds on Netlify, the `netlify.toml` file should
|
||||
|
||||
```toml
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.141.0"
|
||||
DART_SASS_VERSION = "1.83.4"
|
||||
HUGO_VERSION = "0.144.2"
|
||||
DART_SASS_VERSION = "1.85.0"
|
||||
NODE_VERSION = "22"
|
||||
TZ = "America/Los_Angeles"
|
||||
|
||||
@@ -229,12 +224,11 @@ If you build Hugo from source and run `mage test -v`, the test will fail if you
|
||||
|
||||
[brew.sh]: https://brew.sh/
|
||||
[chocolatey.org]: https://community.chocolatey.org/packages/sass
|
||||
[ci/cd]: https://en.wikipedia.org/wiki/CI/CD
|
||||
[dart sass]: https://sass-lang.com/dart-sass
|
||||
[libsass]: https://sass-lang.com/libsass
|
||||
[prebuilt binaries]: https://github.com/sass/dart-sass/releases/latest
|
||||
[scoop.sh]: https://scoop.sh/#/apps?q=sass
|
||||
[site configuration]: /getting-started/configuration/#configure-build
|
||||
[site configuration]: /configuration/build/
|
||||
[snap package]: /installation/linux/#snap
|
||||
[snapcraft.io]: https://snapcraft.io/dart-sass
|
||||
[starter workflow]: https://github.com/actions/starter-workflows/blob/main/pages/hugo.yml
|
||||
|
||||
Reference in New Issue
Block a user