Comments (7)
With the latest version of docz
you can configure the public
folder and the favicon
. For example:
export default {
public: 'config/docz/public',
htmlContext: {
favicon: 'public/favicon.ico'
}
}
from docz.
If you want a documentation improvement, you can open a issue in https://github.com/pedronauck/docz-website or add a pull request!
from docz.
You can follow docz.site example https://github.com/pedronauck/docz-website/blob/0fb96228e4ed2f7f3be1ad17cd7a0c1541002988/doczrc.js#L16-L21
It uses FaviconsWebpackPlugin
.
// doczrc.js
import FaviconsWebpackPlugin from 'favicons-webpack-plugin'
const PUBLIC = path.resolve(__dirname, 'public')
export default {
modifyBundlerConfig: config => {
config.plugins.push(
new FaviconsWebpackPlugin({
logo: `${PUBLIC}/images/favicon.png`,
inject: true,
})
)
return config
}
}
OR you can add directly in a custom html
// doczrc.js
export default {
indexHtml: 'src/index.html',
}
It would be really cool to have some guide on docz.site
from docz.
Hey @renatorib, I tried to add an favicon based on your instructions and they didn't work for me. I found a solution that works in the meantime by adding an external link in the doczrc.js
for the favicon.
External favicon link
// doczrc.js
export default {
htmlContext: {
favicon: 'https://s3-us-west-1.amazonaws.com/set-protocol/favicon.ico',
},
}
I added this and reran yarn dev
which showed the favicon for me. This is mostly a bandaid solution to unblock some folks who are running into the same issue.
Following your recommendation, I opened an issue on the docz-website repo about adding documentation for favicons since I'm sure others are having the same issue by looking down the list of projects using docz who are missing favicons.
Testing Other Repos
I tested the docz-website and island-wars repos, both of which have working deployed favicons. When running both of them locally, I didn't see working favicons.
docz-site
When running the docz-website locally, and saw that the favicon for the site wasn't working for me. It's confusing because the doczrc.js leads to an .ico
file, but the path doesn't match up to anything inside of the public folder. The only favicon I see is a favicon in the public/images folder which is a .png
file. When looking in the source code on docz.site, the favicon link doesn't lead to anything. Would be useful to get clarification on how it works.
island-wars
I saw one repo in the list above that had a working favicon, and running that locally also didn't show a favicon. I did see a useful commit from there that I followed and didn't get me working favicon using that method. Their site does link to the proper favicon.
Production Builds
I questioned whether it was because I wasn't using a production build, so I deployed to Netlify, but also didn't see a working favicon.
I'll move this to the Github issues page, adding it here since I think this will be useful for anyone who is struggling to add a favicon to their docs, knowing that these steps have been tried.
from docz.
Would be useful to get clarification on how it works.
That's the thing, the favicon on https://www.docz.site/ does not work.
from docz.
from docz.
With the latest version of
docz
you can configure thepublic
folder and thefavicon
. For example:export default { public: 'config/docz/public', htmlContext: { favicon: 'public/favicon.ico' } }
This worked for me as well, just be sure to rebuild to see the updated favicon (not just refresh).
from docz.
Related Issues (20)
- node_modules\.bin\gatsby HOT 3
- gh repo clone github/docs HOT 1
- Port not used from custom gatsby-config.js file
- Can't resolve '@emotion/core' HOT 9
- Error on first install. nError handler for invocation 'building-schema', error was 'TypeError: (0 , _buildASTSchema.getDescription) HOT 2
- Test out possibly breaking changes on security updates made from dependabot pull-requests HOT 3
- pnpm bare installs broken HOT 2
- What font is used in Docz image? HOT 3
- Error in setting up development environment HOT 4
- Release notes for 2.4.0 are missing HOT 1
- Multiple errors after installing docz HOT 11
- Error while initializing babel in docz HOT 3
- Can't resolve '@babel/runtime/helpers/esm/regeneratorRuntime'
- Error: Cannot find module 'typescript' docz HOT 2
- Add a visible notice on the documentation on why docz will not work
- Can we say that the project is Dead now? What are the alternatives? HOT 1
- how to use in react 18 HOT 4
- Error docz build
- When I try to run the project in the development environment, I get the following error: HOT 1
- An error occurred while accessing the file after local packaging.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docz.