This is the source for the Nanoc site.
The source code located in the lib/ directory is public domain. The design of this website should not be reused: it is not a template for you to take, so create your own design!
The Nanoc web site
Home Page: http://nanoc.app/
This is the source for the Nanoc site.
The source code located in the lib/ directory is public domain. The design of this website should not be reused: it is not a template for you to take, so create your own design!
Website states that its content is licensed under CC BY-SA 3.0. That applies to code examples too. That means that using examples I have to license my work under the CC BY-SA. This license is not recommended for software and is not compatible with other licenses, such as GPL.
It would be good if code examples were available under different license (e.g. MIT/X11).
The same way for code samples in documentation under GFDL it is recommended to relicense them under GPL.
Likely related to #113.
The Similar Projects section on the nanoc web site has been superseded by staticsitegenerators.net.
nanoc.ws was the first site to contain a list of static site generators, and it is great to see that list evolve into a separate community-maintained project!
(CC @jaspervdj and @balupton)
item.rep_named(:something)
is a Nanoc 3 construct. The upgrade guide doesn’t mention how to convert this.
opensourcegrrrl suggested reorganisation of the docs section: "chapter/section", "Guides", "Reference", "Glossary" (typically part of another doc), and external API docs.
continuing from #65 (comment)
I can play with setting up everything, having ready to use package would be a great improvement to new users, I heard there are issues with nokogiri
but I do not think it will be a lot of time to figure it out.
hi.
i use "gem install nanoc" to install nanoc successfully.but when i use "nanoc create-site nanoc-blog" to try to create a site,i met the error below.
how to fix it?
as3:# gem install nanoc# nanoc create-site nanoc-blog
Fetching: colored-1.2.gem (100%)
Successfully installed colored-1.2
Fetching: cri-2.4.0.gem (100%)
Successfully installed cri-2.4.0
Fetching: nanoc-3.6.5.gem (100%)
Successfully installed nanoc-3.6.5
Parsing documentation for colored-1.2
Installing ri documentation for colored-1.2
Parsing documentation for cri-2.4.0
Installing ri documentation for cri-2.4.0
Parsing documentation for nanoc-3.6.5
Installing ri documentation for nanoc-3.6.5
3 gems installed
as3:
cannot load such file -- cri
If you are using a Gemfile, make sure that the Gemfile contains nanoc ('gem "nanoc"').
Otherwise it's hard to install the new stuff.
The “contribute to this site” box in the sidebar still points to nanoc/nanoc-site
. It should point to nanoc/nanoc.ws
(low priority because it redirects).
#parent
no longer works for items with full-style identifiers, yet this is not documented in the upgrade guide.
There is Nanoc 4 API documentation, but there is no high-level documentation of Nanoc internals.
An older way of getting the default representation of an item is some_item.reps[0]
. This no longer works on Nanoc 4 and needs to be documented.
It says this:
Because inferring the encoding from the environment is so unreliable, the final version of Nanoc 4 might default to UTF-8.
This is no longer accurate and should be removed.
In the Nanoc 4 upgrade guide, the steps to set identifier_type
and string_pattern_type
could benefit from an example. For instance:
string_pattern_type: legacy
data_sources:
- type: filesystem
identifier_type: legacy
This problem arises when storing items in a global during preprocessing, and reusing them later.
Hi,
I've done the migration from Nanoc 3.x to Nanoc 4.0 (thanks for this whole new version!) and faced some issues not documented in the migration guide.
NameError: uninitialized constant Nanoc3
This error refers to the use of Nanoc3::Helpers::*
that must be replaced by Nanoc::Helpers::*
.
NoMethodError: undefined method `rep_named' for #<Nanoc::ItemView:0x007fe76147fd60>
I was using item.rep_named(:myrep)
for good or bad reason but it is no more available. The alternative is to use item.reps[:myrep]
or item.reps.fetch(:myrep)
.
I think this relates to the paragraph
If you get a NoMethodError that you did not expect, you might be using a private API that is no longer present in Nanoc 4.0
So, it should be ok as is, just to mention it if not related to this cause.
NameError: uninitialized constant Nanoc::Int::Context::HTMLEntities
I didn't understood this one, in fact this might not be related to Nanoc 4, but I was using <%= HTMLEntities.new.decode(@config[:site][:name]) %>
in an item filtered by ERB without any issue on Nanoc 3, since the migration, I had to add require 'htmlentities'
before using it.
This "new" behavior seems logical but is surprising according to Nanoc 3 behavior.
item.raw_filename
returns an absolute path to item file in nanoc 4.x but a path relative to nanoc site root in nanoc 3.x
NoMethodError: undefined method `item' for nil:NilClass
0. /xxxxx/ruby/2.2.0/gems/nanoc-4.0.0/lib/nanoc/base/views/item_rep_view.rb:15:in `=='
1. layout /article/:4:in `get_binding'
I was using is_excerpt = @item_rep == @item.rep_named(:excerpt)
and it worked fine but now I have to do is_excerpt = @item_rep.name == @item.reps[:excerpt] ? @item.reps[:excerpt].name : "".to_sym
(it seems to be a quick & dirty solution I think, tell me if there is a better solution).
The issue isn't related to rep_named
, at first I just replaced and used reps[:excerpt]
but the comparison was still causing the error.
autocompile
and watch
have been deprecated in favour of guard-nanoc.
Quoting @Pistos:
It would be good if there were just one spot in the docs that said "here's everything you need to do/put to use .sass/.scss". I had to piece that all together from like 3 things spread out across the documentation, and Stackoverflow, etc.
Also see this gist, which contains the Rules content necessary to get Sass/SCSS working.
CC @Pistos
Bundler is recommended for nanoc sites, yet the tutorial does not mention it at all.
Maybe it should only mention Bundler is NOTE admonitions; teaching how to use Bundler is (and should be) out of scope for the tutorial.
I believe the Community and Development pages on the nanoc web site should go, and be replaced with the following:
Support:
I’d like to get rid of the wiki, since it’s not really used well and I’d rather have all documentation on the site.
It’ll be a small page, though. Not sure whether this page can be rolled into some other page.
Contributing:
It’ll be quite similar to what the Development page is now. The Upgrading to nanoc 4.0 section should probably be moved to Documentation.
The new way of fetching item representations (e.g. item.reps[:default]
) is not documented.
Title says it all.
These are the steps I use to release a new version:
This should be simplified, documented, and others should be given the permission to do this too.
It's fewer keystrokes/simpler to simply do ruby -v
rather than starting up irb
and closing it, with the benefit that users will immediately see if their Ruby is below the nanoc 1.8.6 minimum requirement.
lunr.js may be a good solution.
The upgrade guide does not specify how to upgrade the Rules file with a rule that matches '/'
, e.g.
compile '/' do
# stuff here
end
A rule like this should be converted to match /index.*
:
compile '/index.*' do
# stuff here
end
When a new release is published, it is probably worth updating the Nanoc Wikipedia page. The Releasing guidelines should mention that.
(There might be other places worth updating, too.)
The code font (Consolas) is not imported anywhere. Additionally, the fallback does not provide a bold variant.
In the sentence "you may have to prefix the gem command with sudo to ensure that you’re using root privileges" it's worth noting—since rvm is mentioned earlier—that rvm specifically doesn't want sudo
, so maybe "unless you're using rvm, you may have to prefix the gem command with sudo to ensure that you’re using root privileges".
I loved the getting started tutorial. Everything was smooth sailing until this part:
Next, create a lib/tags.rb file and put in the following function:
def tags
if @item[:tags].nil?
'(none)'
else
@item[:tags].join(', ')
end
end
Modify the layout and add a paragraph that outputs the tags:
<p>Tags: <%= tags %></p>
This appears on this page.
I kept getting errors. I undid these edits and moved onto the next section: "Use a predefined helper"
This new helper method worked flawlessly. Maybe there's something wrong or incompatible with the old tag section?
Looking at the style guide, you can see that the spacing of ULs is different from that of the OLs.
On page:
http://nanoc.ws/contributing/
If you have an idea for a new feature, check whether or not it’s on the nanoc Trello board yet. If it is not, start a discussion on the nanoc Google group.
Following the link to the Trello board gives board not found
The Contributing page says this:
If you have an idea for a new feature, check whether or not it’s on the Nanoc Trello board yet
This Trello board no longer exists.
On the v4 helpers page, the description of methods is cut off. For example:
Returns an unsorted list of articles, i.e.
at http://nanoc.ws/docs/basics/#layouts,
the example has <title><%=h @item[:title] %></title>
That h
might throw some folks off.
(Yeah, I know this is tiny, but I'm such a newbie with Ruby that I can't help in any significant way - heh.)
Hello,
this is just a question. Reading http://nanoc.ws/docs/guides/deploying-nanoc-sites/ it is not clear to me which deploy methods I can use in the deploy hash.
It is clear that I can use rsync, but what about ftp and others?
And, eventually how can I use others using the hash? Is it possible?
Thanks
The 404 page has a confusing sidebar.
18:54 <Pistos> http://nanoc.ws/docs/ <-- I recommend making a subsection in the table of contents for Partials
18:54 <Pistos> Partials documentation is found under Layouts, but when someone goes to the doc page like I did, and does a Ctrl-F for "partial", nothing is found,
18:55 <Pistos> leaving the impression that partials are not supported in nanoc.
18:55 <Pistos> I had to find out about partials by way of stackoverflow.
CC @Pistos
For nanoc 4, the site needs a fresh homepage.
The Variables page mentions how to create items/layouts during preprocessing, but the Rules page does not (even though it describes preprocessing).
The best solution needs an example nanoc.yaml to attract attention.
It seems that the ssg repository doesn't have metadata about the programming language used in a project in their YAML file. Where does that data comes from?
And how about adding more columns for a better comparison? I actually opened an issue over there for that... bevry/staticsitegenerators-list#7
See here: http://staging.nanoc.ws/docs/reference/config/#data_sources
This page says e.g.
type: #{Nanoc::Site::DEFAULT_DATA_SOURCE_CONFIG[:type]}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.