Git Product home page Git Product logo

docsy-example's Introduction

Docsy Example

Docsy is a Hugo theme module for technical documentation sites, providing easy site navigation, structure, and more. This Docsy Example Project uses the Docsy theme component as a hugo module and provides a skeleton documentation structure for you to use. You can clone/copy this project and edit it with your own content, or use it as an example.

In this project, the Docsy theme is pulled in as a Hugo module, together with its dependencies:

$ hugo mod graph
...

For Docsy documentation, see Docsy user guide.

This Docsy Example Project is hosted on Netlify at example.docsy.dev. You can view deploy logs from the deploy section of the project's Netlify dashboard, or this alternate dashboard.

This is not an officially supported Google product. This project is currently maintained.

Using the Docsy Example Project as a template

A simple way to get started is to use this project as a template, which gives you a site project that is set up and ready to use. To do this:

  1. Use the dropdown for switching branches/tags to change to the latest released tag.

  2. Click Use this template.

  3. Select a name for your new project and click Create repository from template.

  4. Make your own local working copy of your new repo using git clone, replacing https://github.com/me/example.git with your repo’s web URL:

git clone --depth 1 https://github.com/me/example.git

You can now edit your own versions of the site’s source files.

If you want to do SCSS edits and want to publish these, you need to install PostCSS

npm install

Running the website locally

Building and running the site locally requires a recent extended version of Hugo. You can find out more about how to install Hugo for your environment in our Getting started guide.

Once you've made your working copy of the site repo, from the repo root folder, run:

hugo server

Running a container locally

You can run docsy-example inside a Docker container, the container runs with a volume bound to the docsy-example folder. This approach doesn't require you to install any dependencies other than Docker Desktop on Windows and Mac, and Docker Compose on Linux.

  1. Build the docker image

    docker-compose build
  2. Run the built image

    docker-compose up

    NOTE: You can run both commands at once with docker-compose up --build.

  3. Verify that the service is working.

    Open your web browser and type http://localhost:1313 in your navigation bar, This opens a local instance of the docsy-example homepage. You can now make changes to the docsy example and those changes will immediately show up in your browser after you save.

Cleanup

To stop Docker Compose, on your terminal window, press Ctrl + C.

To remove the produced images run:

docker-compose rm

For more information see the Docker Compose documentation.

Using a local Docsy clone

Make sure your installed go version is 1.18 or higher.

Clone the latest version of the docsy theme into the parent folder of your project. The newly created repo should now reside in a sibling folder of your site's root folder.

cd root-of-your-site
git clone --branch v0.7.2 https://github.com/google/docsy.git ../docsy

Now run:

HUGO_MODULE_WORKSPACE=docsy.work hugo server --ignoreVendorPaths "**"

or, when using npm, prepend local to the script you want to invoke, e.g.:

npm run local serve

By using the HUGO_MODULE_WORKSPACE directive (either directly or via prefix local when using npm), the server now watches all files and directories inside the sibling directory ../docsy , too. Any changes inside the local docsy theme clone are now immediately picked up (hot reload), you can instantly see the effect of your local edits.

In the command above, we used the environment variable HUGO_MODULE_WORKSPACE to tell hugo about the local workspace file docsy.work. Alternatively, you can declare the workspace file inside your settings file hugo.toml:

[module]
  workspace = "docsy.work"

Your project's hugo.toml file already contains these lines, the directive for workspace assignment is commented out, however. Remove the two trailing comment characters '//' so that this line takes effect.

Troubleshooting

As you run the website locally, you may run into the following error:

$ hugo server
WARN 2023/06/27 16:59:06 Module "project" is not compatible with this Hugo version; run "hugo mod graph" for more information.
Start building sites …
hugo v0.101.0-466fa43c16709b4483689930a4f9ac8add5c9f66+extended windows/amd64 BuildDate=2022-06-16T07:09:16Z VendorInfo=gohugoio
Error: Error building site: "C:\Users\foo\path\to\docsy-example\content\en\_index.md:5:1": failed to extract shortcode: template for shortcode "blocks/cover" not found
Built in 27 ms

This error occurs if you are running an outdated version of Hugo. As of docsy theme version v0.7.0, hugo version 0.110.0 or higher is required. See this section of the user guide for instructions on how to install Hugo.

Or you may be confronted with the following error:

$ hugo server

INFO 2021/01/21 21:07:55 Using config file:
Building sites … INFO 2021/01/21 21:07:55 syncing static files to /
Built in 288 ms
Error: Error building site: TOCSS: failed to transform "scss/main.scss" (text/x-scss): resource "scss/scss/main.scss_9fadf33d895a46083cdd64396b57ef68" not found in file cache

This error occurs if you have not installed the extended version of Hugo. See this section of the user guide for instructions on how to install Hugo.

Or you may encounter the following error:

$ hugo server

Error: failed to download modules: binary with name "go" not found

This error occurs if you have not installed the go programming language on your system. See this section of the user guide for instructions on how to install go.

docsy-example's People

Contributors

aijamalnk avatar alexearnshaw avatar asmacdo avatar bep avatar chalin avatar chenopis avatar chrira avatar coliff avatar deining avatar dependabot[bot] avatar dseynaev avatar emckean avatar gauravgahlot avatar geriom avatar gwatts avatar hegemonic avatar kaycebasques avatar kshithijiyer avatar lisafc avatar marcellodesales avatar mhansen avatar razonyang avatar rionam avatar sarahmaddox avatar sharifsalah avatar tekezo avatar theletterf avatar thesinner avatar ulfjack avatar ykzts avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docsy-example's Issues

public folder

Hi everyone!

May I ask where the public directory is? In other words, I cloned the example and made it run locally but now can't deploy it to Netlify, because there is no public directory. Netlify awaits for a "publish" variable and I don't know what to provide there. I did follow your instructions how to deploy my site to Netlify, either by setting up build options on Netlify itself or by creating a netlify.toml file. Both attempts failed. Where exactly are the generated html files?

Alex

error calling Paginate: cannot convert type page.PagesGroup to Pages

Hi, thanks for developing Docsy!

I'm just starting to use it in a project and have a content directory layout like so:

PS C:\Users\nsg\code\duke\osprey-gui\docs\content> tree /F
Folder PATH listing
Volume serial number is BEEA-4A21
C:.
└───en
    ├───about
    │       _index.html
    │
    ├───articles
    ├───blog
    │       _index.md
    │
    ├───docs
    │       _index.md
    │
    └───tutorials

I get this error message when trying to run hugo server:

PS C:\Users\nsg\code\duke\osprey-gui\docs> hugo server
Building sites … Built in 451 ms
Error: Error building site: failed to render pages: render of "section" failed: "C:\Users\nsg\code\duke\osprey-gui\docs\themes\docsy\layouts\blog\list.html:7:11": execute of template failed: template: blog/list.html:7:11: executing "main" at <.Paginate>: error calling Paginate: cannot convert type page.PagesGroup to Pages
PS C:\Users\nsg\code\duke\osprey-gui\docs>

I'm using docsy as a submodule:

PS C:\Users\nsg\code\duke\osprey-gui\docs> git submodule status
 8b786354829536454688df1e63b9cad792f68562 themes/docsy (heads/master)

Any idea what might be going on, or might I need to provide more information?

Thanks!

Shortcode pageinfo not found

When run the command, it shows the error message.
docsy-example\content\en\docs\Reference_index.md:9:1": failed to extract shortcode: template for shortcode "pageinfo" not found

Thanks!

Template for shortcode "blocks/cover" not found

Hi,
Getting the following error when trying to run the site:

C:\docsy-example-master> hugo server
Start building sites …
Built in 73 ms
Error: Error building site: "C:\Users\ronen\Documents\docsy-example-master\content\no_index.html:7:1": failed to extract shortcode: template for shortcode "blocks/cover" not found

Thanks

build error with instructions in README.md

Following the steps given in README.md.

git clone --recurse-submodules --depth 1 https://github.com/google/docsy-example.git
cd docsy-example
hugo server

Alas, hugo server fails with the following error:

Error: Error building site: render of "404" failed: execute of template failed: template: 
404.html:8:9: executing "404.html" at <partial "navbar.html" .>: error calling partial: 
"/Users/jrs/Sites/docsy-example/themes/docsy/layouts/partials/navbar.html:14:31": execute of 
template failed: template: partials/navbar.html:14:31: executing "partials/navbar.html" at 
<$.IsDescendant>: error calling IsDescendant: runtime error: invalid memory address or nil
 pointer dereference

I installed hugo from tar in the /Sites/ directory and ran the following npm commands in the /docsy-example/ directory.

sudo npm install -g postcss-cli
sudo npm install -g autoprefixer

Brand new to hugo (& go), so thanks in advance for the insight.

Avoiding need for postCSS and npm bits for hugo server

I seem to need to have PostCSS set up in order to run hugo [server] on the demo site.

What would I need to do to include the post-processed bits in my copy of the site so that a simple hugo server would work?

Thanks!

Error building site:

After I clone and run the hugo server I get the following message:

Error: Error building site: TOCSS: failed to transform "scss/main.scss" (text/x-scss): resource "scss/scss/main.scss_9fadf33d895a46083cdd64396b57ef68" not found in file cache

Shallow submodules

Hi,

Thank you for the great work with this theme.
One thing that bother me is the size of the initial git clone for this repository.
The git clone operations just took several minutes on my machine and the result is a 380Mb folder.
Would it be possible to lower this down by using "shallow clone" for submodules ?
I think it could be configured in the .gitmodules file.
See https://stackoverflow.com/a/38895397/3641075

Highlighting config not working well

Hi there,

I've noticed that "Highlighting config" doesn't work well to be able to highlight the code when we use

<? php echo "hello"; ?>

It does not color it well.

My config.toml:

# Highlighting config
pygmentsCodeFences = true
pygmentsUseClasses = true
# Use the new Chroma Go highlighter in Hugo.
pygmentsUseClassic = true
#pygmentsOptions = "linenos=inline"
# See https://help.farbox.com/pygments.html
pygmentsStyle = "tango"

I put this command in terminal to config pygments:

$ hugo gen chromastyles --style=tango > themes/mytheme/static/css/syntax.css

So, in my themes/mytheme/layouts/partials/head.html, I put this new line:

  <link rel="stylesheet" href="/css/syntax.css"/>

The "syntax.css" works fine (code 200), BUT, Highlighting not colours the code... :(

Any idea to fix this issue? or maybe, How to config a custom Highlighting & pygments with Hugo CMS and docsy theme? 😃

Thanks!!!! Regards. 🙏

During initial installation there seems to be a broken partial

During initial installation there seems to be a broken partial - could you please advise?

"section" failed: execute of template failed: template: blog/section.print.html:2:3: executing "main" at <partial "print/render" .>: error calling partial: execute of template failed: template: partials/print/render.html:10:4: executing "recurse-toc" at <partial "print/toc-li.html" (dict "sid" $sid "Page" .)>: error calling partial: " .. /hugo/docsy-example/themes/docsy/layouts/partials/print/toc-li.html:3:5": execute of template failed: template: partials/print/toc-li.html:3:5: executing "partials/print/toc-li.html" at <partial $tpl .>: error calling partial: partial "/print/toc-li-blog.html" not found

Please let me know if any more information is needed.

Error building site: TOCSS: failed to transform "scss/main.scss" (text/x-scss)

Development Environment

  • windows 7(64)
  • git version 2.15.1.windows.2
  • go version go1.15 windows/amd64
  • Hugo Static Site Generator v0.74.3/extended windows/amd64 BuildDate: unknown

Describe the bug

do as the Document say,it all goes ok ,but when i execute the command hugo server,something went wrong,the error info is as follow

Error: Error building site: TOCSS: failed to transform "scss/main.scss" (text/x-scss): 
SCSS processing failed: file "stdin", line 6, col 1: File to import not found or unreadable: ../vendor/bootstrap/scss/

To Reproduce

Steps to reproduce the behavior:

  1. Install Hugo "extended" version(v0.74.3) and go(1.15 windows/amd64)
  2. Cloning the Docsy Example Project(first git clone docsy example,then npm install)
  3. Running the website(hugo server)

Section Menus behave unpredictably

When trying to create nested section menu items, the menu items still show in the main menu as well as the new nested location. You can see this on the example site, too:

Screen Shot 2020-08-03 at 1 37 56 PM

I'm not sure how to fix this myself, which is why I decided to open an issue to report the behavior.

Current behavior: Items nested in the menu show also on the main menu, so are showing twice.

Desired behavior: Items nested in the menu should show only in the nested location and not also on the main menu.

fails with hugo extended

make serve 
cd /Users/apple/workspace/go/src/github.com/joe-getcouragenow/shared-doc/tools/docs/docsy-example && /Users/apple/workspace/go/src/github.com/joe-getcouragenow/shared-doc/tools/docs/hugo server
Start building sites … 

                   | EN | NO  
-------------------+----+-----
  Pages            | 47 | 76  
  Paginator pages  |  0 |  0  
  Non-page files   |  3 |  1  
  Static files     | 38 | 38  
  Processed images | 10 |  2  
  Aliases          |  4 |  0  
  Sitemaps         |  2 |  1  
  Cleaned          |  0 |  0  

Built in 3306 ms
Watching for changes in /Users/apple/workspace/go/src/github.com/joe-getcouragenow/shared-doc/tools/docs/docsy-example/{assets,content,layouts,package.json,themes}
Watching for config changes in /Users/apple/workspace/go/src/github.com/joe-getcouragenow/shared-doc/tools/docs/docsy-example/config.toml, /Users/apple/workspace/go/src/github.com/joe-getcouragenow/shared-doc/tools/docs/docsy-example/themes/docsy/config.toml
fatal error: pipe failed

goroutine 1 [running]:
runtime.throw(0x5cfc2a6, 0xb)
        /usr/local/go/src/runtime/panic.go:1116 +0x72 fp=0xc003ed9860 sp=0xc003ed9830 pc=0x4038e12
runtime.sigNoteSetup(0x6e2d7e0)
        /usr/local/go/src/runtime/os_darwin.go:98 +0xc5 fp=0xc003ed9888 sp=0xc003ed9860 pc=0x4035b65
os/signal.signal_enable(0x310a56400000002)
        /usr/local/go/src/runtime/sigqueue.go:198 +0xa5 fp=0xc003ed98a8 sp=0xc003ed9888 pc=0x406d785
os/signal.enableSignal(...)
        /usr/local/go/src/os/signal/signal_unix.go:49
os/signal.Notify.func1(0x2)
        /usr/local/go/src/os/signal/signal.go:144 +0x88 fp=0xc003ed98c8 sp=0xc003ed98a8 pc=0x562b1c8
os/signal.Notify(0xc006e147e0, 0xc003ed9ae0, 0x2, 0x2)
        /usr/local/go/src/os/signal/signal.go:164 +0x162 fp=0xc003ed9940 sp=0xc003ed98c8 pc=0x562abe2
github.com/gohugoio/hugo/commands.(*commandeer).serve(0xc0006500e0, 0xc00027acc0, 0xa2, 0x100)
        /root/project/hugo/commands/server.go:498 +0x625 fp=0xc003ed9b60 sp=0xc003ed9940 pc=0x5663f05
github.com/gohugoio/hugo/commands.(*serverCmd).server(0xc00027acc0, 0xc0005c2b00, 0x6e2d1e0, 0x0, 0x0, 0x0, 0x0)
        /root/project/hugo/commands/server.go:274 +0x2b6 fp=0xc003ed9ca8 sp=0xc003ed9b60 pc=0x56626d6
github.com/gohugoio/hugo/commands.(*serverCmd).server-fm(0xc0005c2b00, 0x6e2d1e0, 0x0, 0x0, 0x0, 0x0)
        /root/project/hugo/commands/server.go:131 +0x52 fp=0xc003ed9cf0 sp=0xc003ed9ca8 pc=0x5672d92
github.com/spf13/cobra.(*Command).execute(0xc0005c2b00, 0x6e2d1e0, 0x0, 0x0, 0xc0005c2b00, 0x6e2d1e0)
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:850 +0x47c fp=0xc003ed9dc0 sp=0xc003ed9cf0 pc=0x41deb1c
github.com/spf13/cobra.(*Command).ExecuteC(0xc0004ccdc0, 0xc000634290, 0x8, 0xc00011df80)
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:958 +0x375 fp=0xc003ed9e98 sp=0xc003ed9dc0 pc=0x41df695
github.com/gohugoio/hugo/commands.Execute(0xc00019a030, 0x1, 0x1, 0x40086e5, 0xc000046178, 0x0, 0x0)
        /root/project/hugo/commands/hugo.go:90 +0xb9 fp=0xc003ed9f28 sp=0xc003ed9e98 pc=0x564f159
main.main()
        /root/project/hugo/main.go:23 +0x76 fp=0xc003ed9f88 sp=0xc003ed9f28 pc=0x56744d6
runtime.main()
        /usr/local/go/src/runtime/proc.go:204 +0x209 fp=0xc003ed9fe0 sp=0xc003ed9f88 pc=0x403b5e9
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc003ed9fe8 sp=0xc003ed9fe0 pc=0x4071521

goroutine 24 [select]:
go.opencensus.io/stats/view.(*worker).start(0xc0007f6be0)
        /go/pkg/mod/[email protected]/stats/view/worker.go:154 +0x105
created by go.opencensus.io/stats/view.init.0
        /go/pkg/mod/[email protected]/stats/view/worker.go:32 +0x57

goroutine 316 [select]:
github.com/gohugoio/hugo/commands.(*commandeer).newWatcher.func1(0xc002290bc0, 0xc0006500e0, 0xc003fbe538, 0xc00475e270)
        /root/project/hugo/commands/hugo.go:873 +0xd9
created by github.com/gohugoio/hugo/commands.(*commandeer).newWatcher
        /root/project/hugo/commands/hugo.go:871 +0x2cc

goroutine 335 [syscall]:
syscall.syscall6(0x423a960, 0x8, 0x0, 0x0, 0xc000dc8e88, 0xa, 0x6e2d4b0, 0x0, 0x0, 0x0)
        /usr/local/go/src/runtime/sys_darwin.go:85 +0x2e
golang.org/x/sys/unix.kevent(0x8, 0x0, 0x0, 0xc000dc8e88, 0xa, 0x6e2d4b0, 0x0, 0x0, 0x0)
        /go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:292 +0xa6
golang.org/x/sys/unix.Kevent(0x8, 0x0, 0x0, 0x0, 0xc000dc8e88, 0xa, 0xa, 0x6e2d4b0, 0x0, 0x0, ...)
        /go/pkg/mod/golang.org/x/[email protected]/unix/syscall_bsd.go:413 +0x71
github.com/fsnotify/fsnotify.read(0x8, 0xc000dc8e88, 0xa, 0xa, 0x6e2d4b0, 0xc000dc8e88, 0x0, 0xa, 0x0, 0x0)
        /go/pkg/mod/github.com/fsnotify/[email protected]/kqueue.go:511 +0x6e
github.com/fsnotify/fsnotify.(*Watcher).readEvents(0xc004a06ae0)
        /go/pkg/mod/github.com/fsnotify/[email protected]/kqueue.go:274 +0x831
created by github.com/fsnotify/fsnotify.NewWatcher
        /go/pkg/mod/github.com/fsnotify/[email protected]/kqueue.go:62 +0x199

goroutine 337 [select]:
github.com/gohugoio/hugo/livereload.(*hub).run(0x6dedd40)
        /root/project/hugo/livereload/hub.go:39 +0x1e9
created by github.com/gohugoio/hugo/livereload.Initialize
        /root/project/hugo/livereload/livereload.go:98 +0x45

goroutine 336 [select]:
github.com/gohugoio/hugo/watcher.(*Batcher).run(0xc002290bc0)
        /root/project/hugo/watcher/batcher.go:53 +0x174
created by github.com/gohugoio/hugo/watcher.New
        /root/project/hugo/watcher/batcher.go:42 +0x125
make: *** [serve] Error 2

makefile for reproduction:



### HUGO

HUGO_BIN=$(PWD)/hugo
HUGO_GITHUB_FILE=hugo_extended_0.79.0_macOS-64bit.tar.gz
HUGO_GITHUB_URL=https://github.com/gohugoio/hugo/releases/download/v0.79.0/$(HUGO_GITHUB_FILE)

CODE_FSPATH=$(PWD)/docsy-example

print:
	@echo HUGO_BIN: $(HUGO_BIN)
	@echo HUGO_GITHUB_FILE: $(HUGO_GITHUB_FILE)
	@echo HUGO_GITHUB_URL: $(HUGO_GITHUB_URL)
	@echo

dep-os: dep-os-delete
	# https://gohugo.io/getting-started/installing/
	#brew install hugo

	# Curl from github release
	#wget --no-check-certificate --content-disposition $(HUGO_GITHUB_URL)
	# --no-check-cerftificate was necessary for me to have wget not puke about https
	curl -LJO $(HUGO_GITHUB_URL)
	tar -xvf $(HUGO_GITHUB_FILE)
dep-os-delete:
	rm -f $(HUGO_GITHUB_FILE)
	rm -f $(HUGO_BIN)

dep-ex: dep-ex-delete
	git clone --recurse-submodules --depth 1 https://github.com/google/docsy-example.git
dep-ex-delete:
	rm -rf $(CODE_FSPATH)

serve:
	cd $(CODE_FSPATH) && $(HUGO_BIN) server




Not able to run docsy example

I performed these 3 steps
git clone --recurse-submodules --depth 1 https://github.com/google/docsy-example.git
cd docsy-example
hugo server
I am able to view website using hugo server
But when I upload the same on github, I get the following error
Your site is having problems building: A file was included in themes/docsy/assets/vendor/bootstrap/site/docs/4.5/components/alerts.md that is a symlink or does not exist in your _includes directory. For more information, see https://docs.github.com/github/working-with-github-pages/troubleshooting-jekyll-build-errors-for-github-pages-sites#file-is-a-symlink.

build error

Hi,

Any idea? Thanks


Building sites … ERROR 2020/12/18 16:05:02 render of "section" failed: execute of template failed: template: blog/section.print.html:2:3: executing "main" at <partial "print/render" .>: error calling partial: execute of template failed: template: partials/print/render.html:10:4: executing "recurse-toc" at <partial "print/toc-li.html" (dict "sid" $sid "Page" .)>: error calling partial: "themes/docsy/layouts/partials/print/toc-li.html:3:5": execute of template failed: template: partials/print/toc-li.html:3:5: executing "partials/print/toc-li.html" at <partial $tpl .>: error calling partial: partial "/print/toc-li-blog.html" not found
ERROR 2020/12/18 16:05:02 render of "section" failed: execute of template failed: template: blog/section.print.html:2:3: executing "main" at <partial "print/render" .>: error calling partial: execute of template failed: template: partials/print/render.html:10:4: executing "recurse-toc" at <partial "print/toc-li.html" (dict "sid" $sid "Page" .)>: error calling partial: "themes/docsy/layouts/partials/print/toc-li.html:3:5": execute of template failed: template: partials/print/toc-li.html:3:5: executing "partials/print/toc-li.html" at <partial $tpl .>: error calling partial: partial "/print/toc-li-blog.html" not found
ERROR 2020/12/18 16:05:02 failed to render pages: render of "section" failed: execute of template failed: template: blog/section.print.html:2:3: executing "main" at <partial "print/render" .>: error calling partial: execute of template failed: template: partials/print/render.html:10:4: executing "recurse-toc" at <partial "print/toc-li.html" (dict "sid" $sid "Page" .)>: error calling partial: "themes/docsy/layouts/partials/print/toc-li.html:3:5": execute of template failed: template: partials/print/toc-li.html:3:5: executing "partials/print/toc-li.html" at <partial $tpl .>: error calling partial: partial "/print/toc-li-blog.html" not found
Built in 180 ms
Error: Error building site: TOCSS: failed to transform "scss/main.scss" (text/x-scss): SCSS processing failed: file "stdin", line 6, col 1: File to import not found or unreadable: ../vendor/bootstrap/scss/bootstrap. 

Pager.html not working well

Hi there,

The example site, content of blog site, the button's pagination Next and Prev not working well:

https://example.docsy.dev/blog/2018/10/06/easy-documentation-with-docsy/

Anotación 2020-02-12 103238__12

The code of pager.html is this (located in themes\docsy\layouts\partials\pager.html):

<ul class="list-unstyled d-flex justify-content-between align-items-center mb-0 pt-5">
  <li>
    <a {{if .PrevInSection}}href="{{.PrevInSection.RelPermalink}}"{{end}} class="btn btn-primary {{if not .PrevInSection}} disabled{{end}}"><span class="mr-1">←</span> {{ T "ui_pager_prev" }}</a>
  </li>
    <a {{if .NextInSection}}href="{{.NextInSection.RelPermalink}}"{{end}} class="btn btn-primary {{if not .NextInSection}} disabled{{end}}">{{ T "ui_pager_next" }} <span class="ml-1">→</span></a>
  </li>
</ul>

The order is changed. I don't know if it's because of the weight, or why not ... But I think it may be due to the order-content that Hugo has set by default...

In every filename.md the weigth order first (hugo docs) is:

Lower weight gets higher precedence. So content with lower weight will come first.

I have all these content-files ordered ascending by weight... but the prev/next change the order....

The same thing happens with the docs section, if you put the page...

Any ideas to fix it? Thank you! 😃

docsy-example fails to run locally

I created a new repo(gauravgahlot/dummy) using the Docsy Example Project as a template.

Executed the following commands as suggested in steps:

git clone --recurse-submodules --depth 1 https://github.com/gauravgahlot/dummy.git
npm install

When I try to run the site locally, I get the following error:

 ~/dummy (master) ✔ 
➜ hugo server -vvv
INFO 2021/01/21 21:07:55 Using config file: 
Building sites … INFO 2021/01/21 21:07:55 syncing static files to /
Built in 288 ms
Error: Error building site: TOCSS: failed to transform "scss/main.scss" (text/x-scss): resource "scss/scss/main.scss_9fadf33d895a46083cdd64396b57ef68" not found in file cache

Commit messages in every page

I noticed that at the end of each page of my site, a message like: Last modified 19.12.2020: Δημιουργία ενότητας για την R (bdbe62b) (I' m writing in greek), appears every time I edit the corresponding file and commit it to my GitHub repo.

Does anyone know what it is about and how can I hide / delete it? I noticed that this link, and any similar, directs me to the original repo of docsy example (something like https://github.com/google/docsy-example/ commit/bdbe62ba650df186ba3e4f9db6bc67900216bd11) but a 404 page shows up.

Any idea?

Alternative way to install docsy repo into themes

I find git submodules to be really weird. Just a suggestion on a different way to handle the initial setup for the repo.

Ignore the themes directory in .gitignore:

themes
...

Create a package.json:

{
  "name": "docsy-example",
  ...
  "scripts": {
    "install": "cd themes && git clone [email protected]:google/docsy.git"
  },
  ...

Instruct users to run npm install when setting up the docsy-example repo.

Getting Started - example won't build with hugo version 0.68.3

Env:

Ubuntu 20.04
Hugo v.0.68.3/extended
Node v14.3.0

Hi!
I followed the tutorial>

  1. Installed autoprefixer and postcss-cli (who do you need sudo here btw?)
  2. Cloned the Docsy example site
  3. Updated the submodules.

But when I run hugo server I get these errors instead:

Building sites … ERROR 2020/12/21 21:55:47 render of "section" failed: execute of template failed: template: blog/section.print.html:2:3: executing "main" at <partial "print/render" .>: error calling partial: execute of template failed: template: partials/print/render.html:10:4: executing "recurse-toc" at <partial "print/toc-li.html" (dict "sid" $sid "Page" .)>: error calling partial: "/home/joel/Dolittle/docsy-example/themes/docsy/layouts/partials/print/toc-li.html:3:5": execute of template failed: template: partials/print/toc-li.html:3:5: executing "partials/print/toc-li.html" at <partial $tpl .>: error calling partial: partial "/print/toc-li-blog.html" not found
Built in 827 ms
Error: Error building site: failed to render pages: render of "section" failed: execute of template failed: template: blog/section.print.html:2:3: executing "main" at <partial "print/render" .>: error calling partial: execute of template failed: template: partials/print/render.html:10:4: executing "recurse-toc" at <partial "print/toc-li.html" (dict "sid" $sid "Page" .)>: error calling partial: "/home/joel/Dolittle/docsy-example/themes/docsy/layouts/partials/print/toc-li.html:3:5": execute of template failed: template: partials/print/toc-li.html:3:5: executing "partials/print/toc-li.html" at <partial $tpl .>: error calling partial: partial "/print/toc-li-blog.html" not found

Looking into themse/docsy/layouts/partials/print does show that the toc-li-blog.html exists so not quite sure what happening here.

After upgrading to the latest Hugo v0.79.1 extended I got it working, not quite sure what's the tipping point version but it clearly should be higher than v0.52 like the docs say.

fatal error: pipe failed

This is my Hugo version:
Hugo Static Site Generator v0.78.1/extended darwin/amd64 BuildDate: unknown

After cloning and running a local copy (hugo server) I received the following error:
Docsy-Error.txt

I tried with the following command and it works, no error. I could see the site in localhost:1313.
hugo server --watch=false

Could anyone help resolving this issue please? Thanks

Image rendering error

I am not able to add images to blog pages, I am getting the error below...

Error: Error building site: "C:\Projects\GitRepos\example.com\content\en\blog\powershell\ps-int-console-on-vscode-show-on-startup.md:25:1": failed to render shortcode "imgproc": failed to process shortcode: "C:\Projects\GitRepos\example.com\layouts\shortcodes\imgproc.html:9:34": execute of template failed: template: shortcodes/imgproc.html:9:34: executing "shortcodes/imgproc.html" at <$original.Fill>: nil pointer evaluating resource.Resource.Fill

Any help is highly appreciated. Thank you.

Collapsed sidebar

It seems that on a fresh clone of 5a51cdb, when I navigate to the /docs page, the list showing all the documentation sections is collapsed:

What I see:

Screenshot 2020-04-21 at 16 27 35

What I see on https://example.docsy.dev/docs/:

Screenshot 2020-04-21 at 16 27 26

Looking at the source, the line that determines if the section has the "show" css var always seems to evaluate to false for me on the /docs page
https://github.com/google/docsy/tree/4ad7fb270ca02866715e350654b257b7ab99c9d4/layouts/partials/sidebar-tree.html#L25

{{ $show := or (and (not $p.Site.Params.ui.sidebar_menu_compact) ($p.IsAncestor $s)) ($p.IsDescendant $s) }}

I have made the following modification which seems to work:

{{ $show := or (or (and (not $p.Site.Params.ui.sidebar_menu_compact) ($p.IsAncestor $s)) ($p.IsDescendant $s) (eq $p.CurrentSection $s)) }}

I'm thinking that either I'm doing something wrong, or there has been a change in behaviour in hugo whereby isAncestor and isDescendant no longer evaluate true when the page is also the section. The only change I can see in relation to those functions is this gohugoio/hugo@4a39564 which was released in v0.69.0

If you can confirm I'm not doing something wrong then I'll submit a PR over at https://github.com/google/docsy :)

Repository Links

Hi there!

According to user guide, in order to configure links, which directs reader to my repo ("Edit this Page", "Create child page" etc), I have to configure my config.yaml by adding the line: github_repo = "https://github.com/<my_user_name>/<my_repo>" (am I right or I miss something?). I dit that but now the links includes the google/docsy-example's addresses along with my project's folders, something like https://github.com/google/docsy-example/edit/master/content/gr/docs/_index.md (I suppose the https://github.com/google/docsy-example/edit/master/ part is a link to original "google/docsy-example" repo and the content/gr/docs/_index.md, a link to my repo).

Why, after declaring my repo in config.yaml, links are still referencing to docsy-example?

This issue is similar to #96 (also mine), where I'm describing that, at the very bottom of every page, a message like: "Last modified 16.12.2020: first commit (f91b5bc)" appears, where the first commit (f91b5bc) is linkable. This link directs to docsy-example repo (wich ends in a 404 page error) and not to my GitHub repo.

In short, it seems that from the first moment I installed and configured docsy in my project, it continues to be "connected" to google/docsy-example. I know that in your instructions you clarify this and I followed them faithfully but the above problems continue to exist.

Thank you!
Alex

package.json references non-existent tech-doc-hugo project

This project's package.json file (and the main docsy userguide's source) seem to have been imported intact from https://github.com/bep/tech-doc-hugo.

I scratched my head a bit and decided that it probably didn't really matter because it's just being used as a mechanism to declare dev dependencies on postcss and autoprefixer, but wanted to confirm my understanding.

If I'm using this project as the basis for a new docs site, is there any point (or harm) in updating it?

Installation: git first steps to deploy to Netlify

Hi all,
after installation steps

git clone https://github.com/google/docsy-example.git
cd docsy-example
git submodule update --init --recursive

I know I must create a new repo on github. To pushing my local files to the newly created repo, I think I should run something like

git remote add origin https://github.com/user/myNewRepo.git

But I have fatal: remote origin already exists. because I already have https://github.com/google/docsy-example.git.

Is it the right way to solve to run git remote rm origin and than add the new origin? If now, what's the way to do it?

Thank you

hugo server step fails with error

I just followed all the steps given in README.md.

git clone --recurse-submodules --depth 1 https://github.com/google/docsy-example.git
cd docsy-example
hugo server

But doing this hugo server fails.

below is the message I get. I didnt modify any scss files , neither do I intend to.
This is a windows 10 laptop (if that helps or matters)

image

Has someone else faced this before me ?

升级

MS-Asgent升级
Zbxtable-Web为ZbxTable前端页面,新版本已支持国际化,建议升级。

yum makecache -y
yum update zbxtable-web -y

最后一行写错了 应该是yum update ms-asgent -y

Issue related to a symlink that does not exist in your _includes directory

I faced the following error message which is breaking my Github action

A file was included in themes/docsy/assets/vendor/bootstrap/site/docs/4.5/components/alerts.md that is a symlink or does not exist in your _includes directory.

Any idea? I read that I need to create .nojekyll directory but no idea where to create it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.