mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-16 08:15:10 +00:00
content: Consolidate configuration documentation
This commit is contained in:
1 parent
727ef6f665
commit
b6cae5cbc6
911 files changed
+10902
-11171
No files matched your search
@@ -3,19 +3,20 @@ title: os.ReadFile
|
||||
description: Returns the contents of a file.
|
||||
categories: []
|
||||
keywords: []
|
||||
action:
|
||||
aliases: [readFile]
|
||||
related:
|
||||
- functions/os/FileExists
|
||||
- functions/os/Getenv
|
||||
- functions/os/ReadDir
|
||||
- functions/os/Stat
|
||||
returnType: string
|
||||
signatures: [os.ReadFile PATH]
|
||||
params:
|
||||
functions_and_methods:
|
||||
aliases: [readFile]
|
||||
related:
|
||||
- functions/os/FileExists
|
||||
- functions/os/Getenv
|
||||
- functions/os/ReadDir
|
||||
- functions/os/Stat
|
||||
returnType: string
|
||||
signatures: [os.ReadFile PATH]
|
||||
aliases: [/functions/readfile]
|
||||
---
|
||||
|
||||
The `os.ReadFile` function attempts to resolve the path relative to the root of your project directory. If a matching file is not found, it will attempt to resolve the path relative to the [`contentDir`](/getting-started/configuration#contentdir). A leading path separator (`/`) is optional.
|
||||
The `os.ReadFile` function attempts to resolve the path relative to the root of your project directory. If a matching file is not found, it will attempt to resolve the path relative to the [`contentDir`](/configuration/all/#contentdir). A leading path separator (`/`) is optional.
|
||||
|
||||
With a file named README.md in the root of your project directory:
|
||||
|
||||
|
||||
Reference in new issue
Block a user